axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jackdawson <abhishek....@gmail.com>
Subject Re: Axis2 and CXF - Handling WSDLs differently
Date Mon, 29 Sep 2008 16:56:05 GMT

I changed the 'parts' to include element attributes and the WSDL is of
'document' style now. I generated the client stubs and the client and I'm
still getting this exception: 

org.apache.axis2.AxisFault: Parameter {urn:login.safe.two.us}TestLoginType
does not exist!

I don't find where exactly it's going wrong even while debugging either.
The service expects the parameters to be of type 'string' and that's what
the client is sending.

Here is the SOAP envelope:

<?xml version='1.0' encoding='utf-8'?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
	<soapenv:Body>
		<ns1:TestLoginType xmlns:ns1="urn:login.safe.two.us">
			<ns1:eid xmlns:s1="http://www.w3.org/2001/XMLSchema-instance" 
				xmlns:s2="http://www.w3.org/2001/XMLSchema"
s1:type="s2:string">G13522</ns1:eid>
			<ns1:key xmlns:s3="http://www.w3.org/2001/XMLSchema-instance" 
				xmlns:s4="http://www.w3.org/2001/XMLSchema"
s3:type="s4:string">P9534</ns1:key>
		</ns1:TestLoginType>
	</soapenv:Body>
</soapenv:Envelope>


Am I missing something here?

Thanks.









Keithgchapman wrote:
> 
> In your WSDL the parts section look RPC while the binding is document. I
> recommend you that you make both of them the same. Either make both RPC
> (just change the binding style to rpc) or both document (by making the
> part
> refer to an element instead of a type).
> 
> Thanks,
> Keith.
> 
> On Mon, Sep 29, 2008 at 6:57 PM, jackdawson <abhishek.foi@gmail.com>
> wrote:
> 
>>
>> I posted in there too. They say that it's not mandatory to follow the
>> WS-I
>> basic profile as they are just guidelines and this is what they exactly
>> said:
>>
>>
>> http://www.nabble.com/Axis2-and-CXF---Handling-WSDLs-differently-to19696717.html
>>
>> http://www.nabble.com/Axis2-and-CXF---Handling-WSDLs-differently-to19696717.html
>>
>> Instead, I would like to get help in moving ahead with Axis2.
>> Can anyone help me with this?
>>
>> Thanks.
>>
>>
>>
>>
>> Sanjiva Weerawarana wrote:
>> >
>> > I can't imagine how CXF can generate code for this .. there's no
>> element
>> > name to use to put the data in. Maybe you should also post on
>> > user@cxf.apache.org and ask for them to review this.
>> >
>> > Sanjiva.
>> >
>> > keith chapman wrote:
>> >> This WSDL looks  invalid. As you have said when a message part refers
>> to
>> >> a type directly it is RPC whereas when it refers to an element its
>> known
>> >> as document. Now the messages parts of your WSDL is RPC but your
>> binsind
>> >> says that its document. I feel that the WSDL is incorrect and hence
>> >> Axis2 is right in saying that the element is missing.
>> >>
>> >> Thanks,
>> >> Keith.
>> >>
>> >> On Fri, Sep 26, 2008 at 7:45 PM, jackdawson <abhishek.foi@gmail.com
>> >> <mailto:abhishek.foi@gmail.com>> wrote:
>> >>
>> >>
>> >>     Here is what I found:
>> >>            1.) When I used Axis2 Eclipse Codegen plugins (Generate
>> Java
>> >>     source code
>> >>     from WSDL file) to generate code from this WSDL, it didn't allow
>> me.
>> >>                    It kept throwing me an error -
>> >>                            "An error occurred while completing the
>> >> process -
>> >>     java.lang.InterruptedException
>> >>                             No element type is defind for the message
>> >> xxxxx"
>> >>            2.) Then, I switched to CXF 2.0.8 and tried to generate the
>> >>     client as I did
>> >>     with Axis2 and surprisingly, it got through and created the client
>> >> side
>> >>     stubs.
>> >>                    CXF doesn't see this WSDL as a bad one.
>> >>
>> >>                    Please correct me if I'm wrong. To my knowledge,
>> when
>> >>     you define "type"
>> >>     attribute for the "message" and not the "element" attribute then
>> it
>> >>     has to
>> >>     be an "rpc" style.
>> >>                    Axis2 knows it but CXF ignores it.
>> >>
>> >>                    Can anyone let me know why there's a difference in
>> >>     handling the WSDLs?
>> >>                    If I modify the WSDL as Axis2 wants me to and
>> >>     generate just the client and
>> >>     hit the service (which is already existing), will I still be able
>> to
>> >>     succeed?
>> >>
>> >>     Here is the WSDL I'm talking about:
>> >>
>> >>     <?xml version="1.0" encoding="UTF-8"?>
>> >>     <wsdl:definitions targetNamespace="urn:login.safe.two.us
>> >>     <http://login.safe.two.us>"
>> >>            xmlns:apachesoap="http://xml.apache.org/xml-soap"
>> >>            xmlns:impl="urn:login.safe.two.us <http://login.safe.two.us
>> >"
>> >>            xmlns:intf="urn:login.safe.two.us <http://login.safe.two.us
>> >"
>> >>            xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
>> >>            xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/"
>> >>            xmlns:xsd="http://www.w3.org/2001/XMLSchema">
>> >>            <wsdl:types>
>> >>                    <schema elementFormDefault="qualified"
>> >>                            targetNamespace="urn:login.safe.two.us
>> >>     <http://login.safe.two.us>"
>> >>                            xmlns="http://www.w3.org/2001/XMLSchema">
>> >>
>> >>                            <complexType name="TestLoginType">
>> >>                                    <sequence>
>> >>                                            <element name="eid"
>> >>     maxOccurs="1" minOccurs="1" type="xsd:string" />
>> >>                                            <element name="key"
>> >>     nillable="true" type="xsd:string" />
>> >>                                    </sequence>
>> >>                            </complexType>
>> >>
>> >>                            <complexType name="TestLoginTypeResponse">
>> >>                                    <sequence>
>> >>                                            <element
>> name="failedReason"
>> >>     nillable="true" type="xsd:string" />
>> >>                                            <element name="status"
>> >>     type="xsd:boolean" />
>> >>                                    </sequence>
>> >>                            </complexType>
>> >>
>> >>                    </schema>
>> >>            </wsdl:types>
>> >>
>> >>            <wsdl:message name="testLoginRequest">
>> >>                    <wsdl:part name="testLoginRequestAttributes"
>> >>     type="impl:TestLoginType"/>
>> >>            </wsdl:message>
>> >>
>> >>            <wsdl:message name="testLoginResponse">
>> >>                    <wsdl:part name="testLoginResponseAttributes"
>> >>     type="impl:TestLoginTypeResponse"/>
>> >>            </wsdl:message>
>> >>
>> >>            <wsdl:portType name="LoginServicePortType">
>> >>                    <wsdl:operation name="testLogin">
>> >>                            <wsdl:input message="impl:testLoginRequest"
>> >>     name="testLoginRequest" />
>> >>                            <wsdl:output
>> message="impl:testLoginResponse"
>> >>     name="testLoginResponse" />
>> >>                    </wsdl:operation>
>> >>            </wsdl:portType>
>> >>
>> >>            <wsdl:binding name="LoginServiceSoapBinding"
>> >>     type="impl:LoginServicePortType">
>> >>                    <wsdlsoap:binding style="document"
>> >>     transport="http://schemas.xmlsoap.org/soap/http" />
>> >>                    <wsdl:operation name="testLogin">
>> >>                            <wsdlsoap:operation soapAction="" />
>> >>                            <wsdl:input name="testLoginRequest">
>> >>                                    <wsdlsoap:body use="literal" />
>> >>                            </wsdl:input>
>> >>                            <wsdl:output name="testLoginResponse">
>> >>                                    <wsdlsoap:body use="literal" />
>> >>                            </wsdl:output>
>> >>                    </wsdl:operation>
>> >>            </wsdl:binding>
>> >>
>> >>            <wsdl:service name="LoginService">
>> >>                    <wsdl:port binding="impl:LoginServiceSoapBinding"
>> >>     name="LoginService">
>> >>                            <wsdlsoap:address
>> >>
>> >>
>> location="http://JISLOGINDEV:8080/JisAuthentication/services/safelogin"
>> >>     />
>> >>                    </wsdl:port>
>> >>            </wsdl:service>
>> >>     </wsdl:definitions>
>> >>
>> >>
>> >>
>> >>                    Thanks.
>> >>     --
>> >>     View this message in context:
>> >>
>> >>
>> http://www.nabble.com/Axis2-and-CXF---Handling-WSDLs-differently-tp19689331p19689331.html
>> >>     Sent from the Axis - User mailing list archive at Nabble.com.
>> >>
>> >>
>> >>
>> ---------------------------------------------------------------------
>> >>     To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
>> >>     <mailto:axis-user-unsubscribe@ws.apache.org>
>> >>     For additional commands, e-mail: axis-user-help@ws.apache.org
>> >>     <mailto:axis-user-help@ws.apache.org>
>> >>
>> >>
>> >>
>> >>
>> >> --
>> >> Keith Chapman
>> >> Senior Software Engineer
>> >> WSO2 Inc.
>> >> Oxygenating the Web Service Platform.
>> >> http://wso2.org/
>> >>
>> >> blog: http://www.keith-chapman.org
>> >
>> >
>> > --
>> > Sanjiva Weerawarana, Ph.D.
>> > Founder & Director; Lanka Software Foundation;
>> http://www.opensource.lk/
>> > Founder, Chairman & CEO; WSO2, Inc.; http://www.wso2.com/
>> > Member; Apache Software Foundation; http://www.apache.org/
>> > Visiting Lecturer; University of Moratuwa; http://www.cse.mrt.ac.lk/
>> >
>> > Blog: http://sanjiva.weerawarana.org/
>> >
>> > ---------------------------------------------------------------------
>> > To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
>> > For additional commands, e-mail: axis-user-help@ws.apache.org
>> >
>> >
>> >
>>
>> --
>> View this message in context:
>> http://www.nabble.com/Axis2-and-CXF---Handling-WSDLs-differently-tp19689331p19723842.html
>> Sent from the Axis - User mailing list archive at Nabble.com.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
>> For additional commands, e-mail: axis-user-help@ws.apache.org
>>
>>
> 
> 
> -- 
> Keith Chapman
> Senior Software Engineer
> WSO2 Inc.
> Oxygenating the Web Service Platform.
> http://wso2.org/
> 
> blog: http://www.keith-chapman.org
> 
> 

-- 
View this message in context: http://www.nabble.com/Axis2-and-CXF---Handling-WSDLs-differently-tp19689331p19727637.html
Sent from the Axis - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org


Mime
View raw message