• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Empty target namespace with axis1.2

 
Ranch Hand
Posts: 45
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am trying to write a web service client using axis 1.2
Here is the code:




The issue is it generates a request object with an empty namespace for the target and hence it get an invalid response. Here is the request object:



Here is the wsdl.It uses document/literal type formatting.
<?xml version="1.0" encoding="utf-8" ?>
- <wsdl:definitions xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tm="http://microsoft.com/wsdl/mime/textMatching/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:tns="http://tempuri.org/" xmlns:s="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" targetNamespace="http://tempuri.org/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
- <wsdl:types>
- <s:schema elementFormDefault="qualified" targetNamespace="http://tempuri.org/">
- <s:element name="ValidateUser">
- <s:complexType>
- <s:sequence>
<s:element minOccurs="1" maxOccurs="1" name="GpassID" type="s:int" />
</s:sequence>
</s:complexType>
</s:element>
- <s:element name="ValidateUserResponse">
- <s:complexType>
- <s:sequence>
<s:element minOccurs="0" maxOccurs="1" name="ValidateUserResult" type="s:string" />
</s:sequence>
</s:complexType>
</s:element>
- <s:element name="SchemeDetails">
- <s:complexType>
- <s:sequence>
<s:element minOccurs="0" maxOccurs="1" name="SchemeToken" type="s:string" />
</s:sequence>
</s:complexType>
</s:element>
- <s:element name="SchemeDetailsResponse">
- <s:complexType>
- <s:sequence>
- <s:element minOccurs="0" maxOccurs="1" name="SchemeDetailsResult">
- <s:complexType>
+ <s:sequence>
<s:element ref="s:schema" />
<s:any />
</s:sequence>
</s:complexType>
</s:element>
</s:sequence>
</s:complexType>
</s:element>
- <s:element name="SchemeList">
- <s:complexType>
- <s:sequence>
<s:element minOccurs="0" maxOccurs="1" name="SchemeToken" type="s:string" />
</s:sequence>
</s:complexType>
</s:element>
- <s:element name="SchemeListResponse">
- <s:complexType>
- <s:sequence>
- <s:element minOccurs="0" maxOccurs="1" name="SchemeListResult">
- <s:complexType>
- <s:sequence>
<s:element ref="s:schema" />
<s:any />
</s:sequence>
</s:complexType>
</s:element>
</s:sequence>
</s:complexType>
</s:element>
</s:schema>
</wsdl:types>
- <wsdl:message name="ValidateUserSoapIn">
<wsdl:part name="parameters" element="tns:ValidateUser" />
</wsdl:message>
- <wsdl:message name="ValidateUserSoapOut">
<wsdl:part name="parameters" element="tns:ValidateUserResponse" />
</wsdl:message>
- <wsdl:message name="SchemeDetailsSoapIn">
<wsdl:part name="parameters" element="tns:SchemeDetails" />
</wsdl:message>
- <wsdl:message name="SchemeDetailsSoapOut">
<wsdl:part name="parameters" element="tns:SchemeDetailsResponse" />
</wsdl:message>
- <wsdl:message name="SchemeListSoapIn">
<wsdl:part name="parameters" element="tns:SchemeList" />
</wsdl:message>
- <wsdl:message name="SchemeListSoapOut">
<wsdl:part name="parameters" element="tns:SchemeListResponse" />
</wsdl:message>
- <wsdl:portType name="FlexSimpleERPSoap">
- <wsdl:operation name="ValidateUser">
<wsdl:documentation xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">Validates UserID passed in from eRewards Plus.</wsdl:documentation>
<wsdl:input message="tns:ValidateUserSoapIn" />
<wsdl:output message="tns:ValidateUserSoapOut" />
</wsdl:operation>
- <wsdl:operation name="SchemeDetails">
<wsdl:documentation xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">Current status and details of requested Flex Scheme for eRewards Plus.</wsdl:documentation>
<wsdl:input message="tns:SchemeDetailsSoapIn" />
<wsdl:output message="tns:SchemeDetailsSoapOut" />
</wsdl:operation>
- <wsdl:operation name="SchemeList">
<wsdl:documentation xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">List of available Flex Schemes with status for requested user for eRewards Plus.</wsdl:documentation>
<wsdl:input message="tns:SchemeListSoapIn" />
<wsdl:output message="tns:SchemeListSoapOut" />
</wsdl:operation>
</wsdl:portType>
- <wsdl:binding name="FlexSimpleERPSoap" type="tns:FlexSimpleERPSoap">
<soap:binding transport="http://schemas.xmlsoap.org/soap/http" />
- <wsdl:operation name="ValidateUser">
<soap:operation soapAction="http://tempuri.org/ValidateUser" style="document" />
- <wsdl:input>
<soap:body use="literal" />
</wsdl:input>
- <wsdl:output>
<soap:body use="literal" />
</wsdl:output>
</wsdl:operation>
- <wsdl:operation name="SchemeDetails">
<soap:operation soapAction="http://tempuri.org/SchemeDetails" style="document" />
- <wsdl:input>
<soap:body use="literal" />
</wsdl:input>
- <wsdl:output>
<soap:body use="literal" />
</wsdl:output>
</wsdl:operation>
- <wsdl:operation name="SchemeList">
<soap:operation soapAction="http://tempuri.org/SchemeList" style="document" />
- <wsdl:input>
<soap:body use="literal" />
</wsdl:input>
- <wsdl:output>
<soap:body use="literal" />
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
- <wsdl:binding name="FlexSimpleERPSoap12" type="tns:FlexSimpleERPSoap">
<soap12:binding transport="http://schemas.xmlsoap.org/soap/http" />
- <wsdl:operation name="ValidateUser">
<soap12:operation soapAction="http://tempuri.org/ValidateUser" style="document" />
- <wsdl:input>
<soap12:body use="literal" />
</wsdl:input>
- <wsdl:output>
<soap12:body use="literal" />
</wsdl:output>
</wsdl:operation>
- <wsdl:operation name="SchemeDetails">
<soap12:operation soapAction="http://tempuri.org/SchemeDetails" style="document" />
- <wsdl:input>
<soap12:body use="literal" />
</wsdl:input>
- <wsdl:output>
<soap12:body use="literal" />
</wsdl:output>
</wsdl:operation>
- <wsdl:operation name="SchemeList">
<soap12:operation soapAction="http://tempuri.org/SchemeList" style="document" />
- <wsdl:input>
<soap12:body use="literal" />
</wsdl:input>
- <wsdl:output>
<soap12:body use="literal" />
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
- <wsdl:service name="FlexSimpleERP">
- <wsdl:port name="FlexSimpleERPSoap" binding="tns:FlexSimpleERPSoap">
<soap:address location="http://flexsimple.garfield/ws/FlexSimpleERP.asmx" />
</wsdl:port>
- <wsdl:port name="FlexSimpleERPSoap12" binding="tns:FlexSimpleERPSoap12">
<soap12:address location="http://flexsimple.garfield/ws/FlexSimpleERP.asmx" />
</wsdl:port>
</wsdl:service>
</wsdl:definitions>

Can someone give me pointers as what i am missing here??
[ December 04, 2008: Message edited by: Suzi Cooper ]
 
Bartender
Posts: 2968
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Suzi Cooper:
I am trying to write a web service client using axis 1.2



If you use Axis 1.4 does it still happen? The described behavior is associated with the WS-I Basic Profile 1.0 and the RPC/literal messaging mode - but it seems to be exhibiting it here for Document/Literal - which makes me wonder if they fixed it in in Axis 1.4.

See Empty Namespace in SOAP (Axis 1.4)
 
Suzi Cooper
Ranch Hand
Posts: 45
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have tried upgrading to axis1.4 but I still get the same request object as above with empty namespace.

Anyone has any pointers on how to get around this?
 
Peer Reynders
Bartender
Posts: 2968
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
... overlooked the code at the top of your post.

The request that Axis sent is entirely appropriate for that code.

Is there any particular reason that you aren't using WSDL2Java to generate a client stub and use that instead?
WSDL2Java: Building stubs, skeletons, and data types from WSDL
[ December 05, 2008: Message edited by: Peer Reynders ]
 
Suzi Cooper
Ranch Hand
Posts: 45
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The web-service is written in .NET by a third party. I have to write the client for it. Being new to this arena of web-services, I was trying to write a very simplistic client.
 
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You can use Axis' wsdl2java tool regardless of the implementation details (such as language) of the service involved. It's the easiest way to create a client.
 
reply
    Bookmark Topic Watch Topic
  • New Topic