You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by Vinod D <vi...@yahoo.com> on 2009/05/19 02:33:47 UTC

wsdl2xml and XML Binding

Hello

I am running into an isse with XML Binding. Here is what I am doing 

- Using CXF 2.1.3 and deploying it in tomcat 6.x
- Define a simple wsdl (wsdl first approach) with one method (sayHi) which takes two string params and returns a cat-ed string.
- Works fine using SOAP Binding (first two log entried below).
- Used wsdl2xml tool to create a XML Port and XML Binding and invoke the sayHi method.
- I see in XML message logging on tomcat call (sayHi) coming with two string param , however to the service method impl I see both the strings
are passed as null (last two log-entry below).

Are there any issues re. using wsdl2xml in this manner or something I am missing.

regards
-Vinod

----------------------------------
INFO: Inbound Message
----------------------------
Payload: <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><
soap:Body><ns2:sayHi xmlns:ns2="http://acme.com/test/"><arg1>argument1</arg1><ar
g2>argument2</arg2></ns2:sayHi></soap:Body></soap:Envelope>
--------------------------------------
TestPortTypeImpl::sayHi() is called arg1=argument1, arg2=argument2
May 18, 2009 4:42:25 PM org.apache.cxf.interceptor.LoggingOutInterceptor$Logging
Callback onClose
INFO: Outbound Message
---------------------------
Payload: <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><
soap:Body><ns2:sayHiResponse xmlns:ns2="http://acme.com/test/"><out>sayHi to : a
rgument1 and argument2</out></ns2:sayHiResponse></soap:Body></soap:Envelope>
--------------------------------------
INFO: Inbound Message
----------------------------
Payload: <ns2:sayHi xmlns:ns2="http://acme.com/test/"><arg1>argument1</arg1><arg
2>argument2</arg2></ns2:sayHi>
--------------------------------------
TestPortTypeXMLImpl::sayHi() is called arg1=null, arg2=null
May 18, 2009 4:47:55 PM org.apache.cxf.interceptor.LoggingOutInterceptor$Logging
Callback onClose
INFO: Outbound Message
---------------------------
Encoding: UTF-8
Headers: {}
Messages:
Payload: <ns2:sayHiResponse xmlns:ns2="http://acme.com/test/"><out>sayHi to : nu
ll and null</out></ns2:sayHiResponse>
--------------------------------------


      

Re: wsdl2xml and XML Binding

Posted by Vinod D <vi...@yahoo.com>.
I tried with 2.1.5 and observed the same i.e. null being passed to the service implementation.

As suggested, I have entered info on JIRA (bugID below). 

WSDL2XML generated binding not passing correct method arguments in service implementation
-----------------------------------------------------------------------------------------
                Key: CXF-2228
thanks
Vinod

________________________________
From: Daniel Kulp <dk...@apache.org>
To: users@cxf.apache.org
Cc: Vinod D <vi...@yahoo.com>
Sent: Tuesday, May 19, 2009 1:24:32 PM
Subject: Re: wsdl2xml and XML Binding


That SHOULD be fine.  Can you :

1) try with CXF 2.1.5 or 2.2.1.  This MAY be fixed already.

2) If not, can you package up your sample and attach it to a JIRA bug report?

Thanks!
Dan


On Mon May 18 2009 8:33:47 pm Vinod D wrote:
> Hello
>
> I am running into an isse with XML Binding. Here is what I am doing
>
> - Using CXF 2.1.3 and deploying it in tomcat 6.x
> - Define a simple wsdl (wsdl first approach) with one method (sayHi) which
> takes two string params and returns a cat-ed string. - Works fine using
> SOAP Binding (first two log entried below).
> - Used wsdl2xml tool to create a XML Port and XML Binding and invoke the
> sayHi method. - I see in XML message logging on tomcat call (sayHi) coming
> with two string param , however to the service method impl I see both the
> strings are passed as null (last two log-entry below).
>
> Are there any issues re. using wsdl2xml in this manner or something I am
> missing.
>
> regards
> -Vinod
>
> ----------------------------------
> INFO: Inbound Message
> ----------------------------
> Payload: <soap:Envelope
> xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><
> soap:Body><ns2:sayHi
> xmlns:ns2="http://acme.com/test/"><arg1>argument1</arg1><ar
> g2>argument2</arg2></ns2:sayHi></soap:Body></soap:Envelope>
> --------------------------------------
> TestPortTypeImpl::sayHi() is called arg1=argument1, arg2=argument2
> May 18, 2009 4:42:25 PM
> org.apache.cxf.interceptor.LoggingOutInterceptor$Logging Callback onClose
> INFO: Outbound Message
> ---------------------------
> Payload: <soap:Envelope
> xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><
> soap:Body><ns2:sayHiResponse xmlns:ns2="http://acme.com/test/"><out>sayHi
> to : a rgument1 and
> argument2</out></ns2:sayHiResponse></soap:Body></soap:Envelope>
> --------------------------------------
> INFO: Inbound Message
> ----------------------------
> Payload: <ns2:sayHi
> xmlns:ns2="http://acme.com/test/"><arg1>argument1</arg1><arg
> 2>argument2</arg2></ns2:sayHi>
> --------------------------------------
> TestPortTypeXMLImpl::sayHi() is called arg1=null, arg2=null
> May 18, 2009 4:47:55 PM
> org.apache.cxf.interceptor.LoggingOutInterceptor$Logging Callback onClose
> INFO: Outbound Message
> ---------------------------
> Encoding: UTF-8
> Headers: {}
> Messages:
> Payload: <ns2:sayHiResponse xmlns:ns2="http://acme.com/test/"><out>sayHi to
> : nu ll and null</out></ns2:sayHiResponse>
> --------------------------------------

-- 
Daniel Kulp
dkulp@apache.org
http://www.dankulp.com/blog



      

Re: wsdl2xml and XML Binding

Posted by Daniel Kulp <dk...@apache.org>.
That SHOULD be fine.   Can you :

1) try with CXF 2.1.5 or 2.2.1.   This MAY be fixed already.

2) If not, can you package up your sample and attach it to a JIRA bug report?

Thanks!
Dan


On Mon May 18 2009 8:33:47 pm Vinod D wrote:
> Hello
>
> I am running into an isse with XML Binding. Here is what I am doing
>
> - Using CXF 2.1.3 and deploying it in tomcat 6.x
> - Define a simple wsdl (wsdl first approach) with one method (sayHi) which
> takes two string params and returns a cat-ed string. - Works fine using
> SOAP Binding (first two log entried below).
> - Used wsdl2xml tool to create a XML Port and XML Binding and invoke the
> sayHi method. - I see in XML message logging on tomcat call (sayHi) coming
> with two string param , however to the service method impl I see both the
> strings are passed as null (last two log-entry below).
>
> Are there any issues re. using wsdl2xml in this manner or something I am
> missing.
>
> regards
> -Vinod
>
> ----------------------------------
> INFO: Inbound Message
> ----------------------------
> Payload: <soap:Envelope
> xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><
> soap:Body><ns2:sayHi
> xmlns:ns2="http://acme.com/test/"><arg1>argument1</arg1><ar
> g2>argument2</arg2></ns2:sayHi></soap:Body></soap:Envelope>
> --------------------------------------
> TestPortTypeImpl::sayHi() is called arg1=argument1, arg2=argument2
> May 18, 2009 4:42:25 PM
> org.apache.cxf.interceptor.LoggingOutInterceptor$Logging Callback onClose
> INFO: Outbound Message
> ---------------------------
> Payload: <soap:Envelope
> xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><
> soap:Body><ns2:sayHiResponse xmlns:ns2="http://acme.com/test/"><out>sayHi
> to : a rgument1 and
> argument2</out></ns2:sayHiResponse></soap:Body></soap:Envelope>
> --------------------------------------
> INFO: Inbound Message
> ----------------------------
> Payload: <ns2:sayHi
> xmlns:ns2="http://acme.com/test/"><arg1>argument1</arg1><arg
> 2>argument2</arg2></ns2:sayHi>
> --------------------------------------
> TestPortTypeXMLImpl::sayHi() is called arg1=null, arg2=null
> May 18, 2009 4:47:55 PM
> org.apache.cxf.interceptor.LoggingOutInterceptor$Logging Callback onClose
> INFO: Outbound Message
> ---------------------------
> Encoding: UTF-8
> Headers: {}
> Messages:
> Payload: <ns2:sayHiResponse xmlns:ns2="http://acme.com/test/"><out>sayHi to
> : nu ll and null</out></ns2:sayHiResponse>
> --------------------------------------

-- 
Daniel Kulp
dkulp@apache.org
http://www.dankulp.com/blog