You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cxf.apache.org by "Martin Varecha (JIRA)" <ji...@apache.org> on 2008/01/05 16:04:34 UTC
[jira] Created: (CXF-1356) Problem with unmarschalling parameters
Problem with unmarschalling parameters
--------------------------------------
Key: CXF-1356
URL: https://issues.apache.org/jira/browse/CXF-1356
Project: CXF
Issue Type: Bug
Components: JAXB Databinding
Affects Versions: 2.0.3
Environment: Tomcat 5.5.23, Spring 2.1-m2, CXF 2.0.3, jaxb-impl 2.0.5
Reporter: Martin Varecha
I tried to run sample application "fromwsdl" from jwsdp-2.0 using CXF. Classes are generated using wsdl2java tool.
Service is running correctly, but something is wrong with unmarschalling parameters from request message.
Both parameters of method "addNumbers" are always 0.
Message looks like this:
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<ns1:addNumbers xmlns:ns1="http://duke.org/">
<arg0 xmlns="http://duke.org/">1</arg0>
<arg1 xmlns="http://duke.org/">2</arg1>
</ns1:addNumbers>
</soap:Body>
</soap:Envelope>
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (CXF-1356) Problem with unmarschalling parameters
Posted by "Glen Mazza (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CXF-1356?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12556234#action_12556234 ]
Glen Mazza commented on CXF-1356:
---------------------------------
Isn't the obsolete java web services developer pack a JAX-RPC implementation (and not JAX-WS)? You should upgrade to Sun's JAX-WS based Metro if you wish to do the comparison.
> Problem with unmarschalling parameters
> --------------------------------------
>
> Key: CXF-1356
> URL: https://issues.apache.org/jira/browse/CXF-1356
> Project: CXF
> Issue Type: Bug
> Components: JAXB Databinding
> Affects Versions: 2.0.3
> Environment: Tomcat 5.5.23, Spring 2.1-m2, CXF 2.0.3, jaxb-impl 2.0.5
> Reporter: Martin Varecha
>
> I tried to run sample application "fromwsdl" from jwsdp-2.0 using CXF. Classes are generated using wsdl2java tool.
> Service is running correctly, but something is wrong with unmarschalling parameters from request message.
> Both parameters of method "addNumbers" are always 0.
> Message looks like this:
> <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
> <soap:Body>
> <ns1:addNumbers xmlns:ns1="http://duke.org/">
> <arg0 xmlns="http://duke.org/">1</arg0>
> <arg1 xmlns="http://duke.org/">2</arg1>
> </ns1:addNumbers>
> </soap:Body>
> </soap:Envelope>
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (CXF-1356) Problem with unmarschalling parameters
Posted by "Daniel Kulp (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CXF-1356?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12556578#action_12556578 ]
Daniel Kulp commented on CXF-1356:
----------------------------------
If you use the ClientProxyFactoryBean without using a wsdl to define the namespaces, it follows the JAX-WS rules to generate the namespaces, and that means adding the trailing "/". That is the only real difference in the messages: the namespace is different due to the trailing "/".
There are a couple ways to work around that:
1) Use the wsdl - call factory.setWsdlLocation(.....) to the location of the wsdl (you can use the ?wsdl url from the service). Unfortunately, there are bugs with this with 2.0.3 (should be fixed in 2.0.4) where this doesn't always work. :-( You can use the JaxWsProxyFactoryBean where the wsdl use should work.
2) Add a service configuration that maps the namespace differently. Fortunately, we have one. The AegisServiceConfiguration maps to namespaces without the trailing slash. Thus, you can probably do something like:
factory.getServiceFactory().getConfigurations().add(0, new AegisServiceConfiguration());
> Problem with unmarschalling parameters
> --------------------------------------
>
> Key: CXF-1356
> URL: https://issues.apache.org/jira/browse/CXF-1356
> Project: CXF
> Issue Type: Bug
> Components: JAXB Databinding
> Affects Versions: 2.0.3
> Environment: Tomcat 5.5.23, Spring 2.1-m2, CXF 2.0.3, jaxb-impl 2.0.5
> Reporter: Martin Varecha
> Attachments: AddNumbers.wsdl
>
>
> I tried to run sample application "fromwsdl" from jwsdp-2.0 using CXF. Classes are generated using wsdl2java tool.
> Service is running correctly, but something is wrong with unmarschalling parameters from request message.
> Both parameters of method "addNumbers" are always 0.
> Message looks like this:
> <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
> <soap:Body>
> <ns1:addNumbers xmlns:ns1="http://duke.org/">
> <arg0 xmlns="http://duke.org/">1</arg0>
> <arg1 xmlns="http://duke.org/">2</arg1>
> </ns1:addNumbers>
> </soap:Body>
> </soap:Envelope>
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
Re: [jira] Commented: (CXF-1356) Problem
with unmarschalling parameters
Posted by Benson Margulies <bi...@gmail.com>.
> >
>
> According to Anne Thomas Manes[1] at least, namespaces declarations for
> the soap:body elements in the WSDL are a no-no for document style.
>
> [1] http://marc.info/?l=axis-user&m=117394780408840&w=2
>
Are his remarks purely about WSDL? I didn't even know that you could put
a namespace into a wsdl soap:body element.
Re: [jira] Commented: (CXF-1356) Problem with unmarschalling parameters
Posted by Glen Mazza <gl...@verizon.net>.
Am Sonntag, den 06.01.2008, 17:01 -0500 schrieb Benson Margulies:
> > Hmmm....I believe with Document-Literal, the arguments (arg0 and arg1) are *not* supposed to have namespace declarations, they take the namespace of the parent object (ns1:addNumbers). That may be the problem here.
> >
>
> The WSDL will tell us. What does it say?
>
>
According to Anne Thomas Manes[1] at least, namespaces declarations for
the soap:body elements in the WSDL are a no-no for document style.
[1] http://marc.info/?l=axis-user&m=117394780408840&w=2
Glen
> >
> > > Problem with unmarschalling parameters
> > > --------------------------------------
> > >
> > > Key: CXF-1356
> > > URL: https://issues.apache.org/jira/browse/CXF-1356
> > > Project: CXF
> > > Issue Type: Bug
> > > Components: JAXB Databinding
> > > Affects Versions: 2.0.3
> > > Environment: Tomcat 5.5.23, Spring 2.1-m2, CXF 2.0.3, jaxb-impl 2.0.5
> > > Reporter: Martin Varecha
> > > Attachments: AddNumbers.wsdl
> > >
> > >
> > > I tried to run sample application "fromwsdl" from jwsdp-2.0 using CXF. Classes are generated using wsdl2java tool.
> > > Service is running correctly, but something is wrong with unmarschalling parameters from request message.
> > > Both parameters of method "addNumbers" are always 0.
> > > Message looks like this:
> > > <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
> > > <soap:Body>
> > > <ns1:addNumbers xmlns:ns1="http://duke.org/">
> > > <arg0 xmlns="http://duke.org/">1</arg0>
> > > <arg1 xmlns="http://duke.org/">2</arg1>
> > > </ns1:addNumbers>
> > > </soap:Body>
> > > </soap:Envelope>
> >
>
Re: [jira] Commented: (CXF-1356) Problem with unmarschalling
parameters
Posted by Benson Margulies <bi...@gmail.com>.
> Hmmm....I believe with Document-Literal, the arguments (arg0 and arg1) are *not* supposed to have namespace declarations, they take the namespace of the parent object (ns1:addNumbers). That may be the problem here.
>
The WSDL will tell us. What does it say?
>
> > Problem with unmarschalling parameters
> > --------------------------------------
> >
> > Key: CXF-1356
> > URL: https://issues.apache.org/jira/browse/CXF-1356
> > Project: CXF
> > Issue Type: Bug
> > Components: JAXB Databinding
> > Affects Versions: 2.0.3
> > Environment: Tomcat 5.5.23, Spring 2.1-m2, CXF 2.0.3, jaxb-impl 2.0.5
> > Reporter: Martin Varecha
> > Attachments: AddNumbers.wsdl
> >
> >
> > I tried to run sample application "fromwsdl" from jwsdp-2.0 using CXF. Classes are generated using wsdl2java tool.
> > Service is running correctly, but something is wrong with unmarschalling parameters from request message.
> > Both parameters of method "addNumbers" are always 0.
> > Message looks like this:
> > <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
> > <soap:Body>
> > <ns1:addNumbers xmlns:ns1="http://duke.org/">
> > <arg0 xmlns="http://duke.org/">1</arg0>
> > <arg1 xmlns="http://duke.org/">2</arg1>
> > </ns1:addNumbers>
> > </soap:Body>
> > </soap:Envelope>
>
Re: [jira] Commented: (CXF-1356) Problem with unmarschalling
parameters
Posted by Benson Margulies <bi...@gmail.com>.
> Hmmm....I believe with Document-Literal, the arguments (arg0 and arg1) are *not* supposed to have namespace declarations, they take the namespace of the parent object (ns1:addNumbers). That may be the problem here.
>
The WSDL will tell us. What does it say?
>
> > Problem with unmarschalling parameters
> > --------------------------------------
> >
> > Key: CXF-1356
> > URL: https://issues.apache.org/jira/browse/CXF-1356
> > Project: CXF
> > Issue Type: Bug
> > Components: JAXB Databinding
> > Affects Versions: 2.0.3
> > Environment: Tomcat 5.5.23, Spring 2.1-m2, CXF 2.0.3, jaxb-impl 2.0.5
> > Reporter: Martin Varecha
> > Attachments: AddNumbers.wsdl
> >
> >
> > I tried to run sample application "fromwsdl" from jwsdp-2.0 using CXF. Classes are generated using wsdl2java tool.
> > Service is running correctly, but something is wrong with unmarschalling parameters from request message.
> > Both parameters of method "addNumbers" are always 0.
> > Message looks like this:
> > <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
> > <soap:Body>
> > <ns1:addNumbers xmlns:ns1="http://duke.org/">
> > <arg0 xmlns="http://duke.org/">1</arg0>
> > <arg1 xmlns="http://duke.org/">2</arg1>
> > </ns1:addNumbers>
> > </soap:Body>
> > </soap:Envelope>
>
[jira] Commented: (CXF-1356) Problem with unmarschalling parameters
Posted by "Glen Mazza (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CXF-1356?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12556431#action_12556431 ]
Glen Mazza commented on CXF-1356:
---------------------------------
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<ns1:addNumbers xmlns:ns1="http://duke.org/">
<arg0 xmlns="http://duke.org/">1</arg0>
<arg1 xmlns="http://duke.org/">2</arg1>
</ns1:addNumbers>
</soap:Body>
</soap:Envelope>
Hmmm....I believe with Document-Literal, the arguments (arg0 and arg1) are *not* supposed to have namespace declarations, they take the namespace of the parent object (ns1:addNumbers). That may be the problem here.
> Problem with unmarschalling parameters
> --------------------------------------
>
> Key: CXF-1356
> URL: https://issues.apache.org/jira/browse/CXF-1356
> Project: CXF
> Issue Type: Bug
> Components: JAXB Databinding
> Affects Versions: 2.0.3
> Environment: Tomcat 5.5.23, Spring 2.1-m2, CXF 2.0.3, jaxb-impl 2.0.5
> Reporter: Martin Varecha
> Attachments: AddNumbers.wsdl
>
>
> I tried to run sample application "fromwsdl" from jwsdp-2.0 using CXF. Classes are generated using wsdl2java tool.
> Service is running correctly, but something is wrong with unmarschalling parameters from request message.
> Both parameters of method "addNumbers" are always 0.
> Message looks like this:
> <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
> <soap:Body>
> <ns1:addNumbers xmlns:ns1="http://duke.org/">
> <arg0 xmlns="http://duke.org/">1</arg0>
> <arg1 xmlns="http://duke.org/">2</arg1>
> </ns1:addNumbers>
> </soap:Body>
> </soap:Envelope>
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (CXF-1356) Problem with unmarschalling parameters
Posted by "Martin Varecha (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CXF-1356?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Martin Varecha updated CXF-1356:
--------------------------------
Attachment: AddNumbers.wsdl
WSDL file
> Problem with unmarschalling parameters
> --------------------------------------
>
> Key: CXF-1356
> URL: https://issues.apache.org/jira/browse/CXF-1356
> Project: CXF
> Issue Type: Bug
> Components: JAXB Databinding
> Affects Versions: 2.0.3
> Environment: Tomcat 5.5.23, Spring 2.1-m2, CXF 2.0.3, jaxb-impl 2.0.5
> Reporter: Martin Varecha
> Attachments: AddNumbers.wsdl
>
>
> I tried to run sample application "fromwsdl" from jwsdp-2.0 using CXF. Classes are generated using wsdl2java tool.
> Service is running correctly, but something is wrong with unmarschalling parameters from request message.
> Both parameters of method "addNumbers" are always 0.
> Message looks like this:
> <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
> <soap:Body>
> <ns1:addNumbers xmlns:ns1="http://duke.org/">
> <arg0 xmlns="http://duke.org/">1</arg0>
> <arg1 xmlns="http://duke.org/">2</arg1>
> </ns1:addNumbers>
> </soap:Body>
> </soap:Envelope>
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (CXF-1356) Problem with unmarschalling parameters
Posted by "Martin Varecha (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CXF-1356?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12556241#action_12556241 ]
Martin Varecha commented on CXF-1356:
-------------------------------------
I used jax-ws example, not jax-rpc example and there is the same example in JAXWS2.1.3-20071218, thus I didn't use anything obsolete.
> Problem with unmarschalling parameters
> --------------------------------------
>
> Key: CXF-1356
> URL: https://issues.apache.org/jira/browse/CXF-1356
> Project: CXF
> Issue Type: Bug
> Components: JAXB Databinding
> Affects Versions: 2.0.3
> Environment: Tomcat 5.5.23, Spring 2.1-m2, CXF 2.0.3, jaxb-impl 2.0.5
> Reporter: Martin Varecha
> Attachments: AddNumbers.wsdl
>
>
> I tried to run sample application "fromwsdl" from jwsdp-2.0 using CXF. Classes are generated using wsdl2java tool.
> Service is running correctly, but something is wrong with unmarschalling parameters from request message.
> Both parameters of method "addNumbers" are always 0.
> Message looks like this:
> <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
> <soap:Body>
> <ns1:addNumbers xmlns:ns1="http://duke.org/">
> <arg0 xmlns="http://duke.org/">1</arg0>
> <arg1 xmlns="http://duke.org/">2</arg1>
> </ns1:addNumbers>
> </soap:Body>
> </soap:Envelope>
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (CXF-1356) Problem with unmarschalling parameters
Posted by "Glen Mazza (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CXF-1356?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12556250#action_12556250 ]
Glen Mazza commented on CXF-1356:
---------------------------------
More detective work is needed on your side I think. What happens when you try to run our own WSDL-first example[1] -- does it work? What happens when you try to run your attached web service with Metro[2] -- does it work?
Having done so countless times, I'm highly confident Apache CXF web services are capable of sending strings containing numbers from the SOAP client to the web service. I'm still inclined to believe the problem is somewhere in the sample that you are using.
[1] http://svn.apache.org/viewvc/incubator/cxf/trunk/distribution/src/main/release/samples/
[2] http://www.jroller.com/gmazza/date/20071019
> Problem with unmarschalling parameters
> --------------------------------------
>
> Key: CXF-1356
> URL: https://issues.apache.org/jira/browse/CXF-1356
> Project: CXF
> Issue Type: Bug
> Components: JAXB Databinding
> Affects Versions: 2.0.3
> Environment: Tomcat 5.5.23, Spring 2.1-m2, CXF 2.0.3, jaxb-impl 2.0.5
> Reporter: Martin Varecha
> Attachments: AddNumbers.wsdl
>
>
> I tried to run sample application "fromwsdl" from jwsdp-2.0 using CXF. Classes are generated using wsdl2java tool.
> Service is running correctly, but something is wrong with unmarschalling parameters from request message.
> Both parameters of method "addNumbers" are always 0.
> Message looks like this:
> <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
> <soap:Body>
> <ns1:addNumbers xmlns:ns1="http://duke.org/">
> <arg0 xmlns="http://duke.org/">1</arg0>
> <arg1 xmlns="http://duke.org/">2</arg1>
> </ns1:addNumbers>
> </soap:Body>
> </soap:Envelope>
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (CXF-1356) Problem with unmarschalling parameters
Posted by "Martin Varecha (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CXF-1356?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12556420#action_12556420 ]
Martin Varecha commented on CXF-1356:
-------------------------------------
Thanks for the examples!
Problem is in client and request message.
I have 2 test clients connecting the same service.
* Common client (+generated class org.duke.AddNumbersService) works perfectly,
* the second one using ClientProxyFactoryBean doen't work as I described before.
* Common client
(result is 30)
AddNumbersPortType port = new AddNumbersService().getAddNumbersPort();
int result = port.addNumbers (10, 20);
request message is:
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><soap:Body><addNumbers xmlns="http://duke.org"><arg0>10</arg0><arg1>20</arg1></addNumbers></soap:Body></soap:Envelope>
* ClientProxyFactoryBean client
(parameters aren't recognized and returns 0)
ClientProxyFactoryBean factory = new ClientProxyFactoryBean();
factory.setServiceClass(AddNumbersPortType.class);
factory.setAddress("http://localhost:8080/ws/services/Service");
AddNumbersPortType client = (AddNumbersPortType)factory.create();
int result = client.addNumbers(1, 2 );
request message is:
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><soap:Body><ns1:addNumbers xmlns:ns1="http://duke.org/"><arg0 xmlns="http://duke.org/">1</arg0><arg1 xmlns="http://duke.org/">2</arg1></ns1:addNumbers></soap:Body></soap:Envelope>
I don't know what is wrong, maybe ClientProxyFactoryBean isn't initialized properly.
> Problem with unmarschalling parameters
> --------------------------------------
>
> Key: CXF-1356
> URL: https://issues.apache.org/jira/browse/CXF-1356
> Project: CXF
> Issue Type: Bug
> Components: JAXB Databinding
> Affects Versions: 2.0.3
> Environment: Tomcat 5.5.23, Spring 2.1-m2, CXF 2.0.3, jaxb-impl 2.0.5
> Reporter: Martin Varecha
> Attachments: AddNumbers.wsdl
>
>
> I tried to run sample application "fromwsdl" from jwsdp-2.0 using CXF. Classes are generated using wsdl2java tool.
> Service is running correctly, but something is wrong with unmarschalling parameters from request message.
> Both parameters of method "addNumbers" are always 0.
> Message looks like this:
> <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
> <soap:Body>
> <ns1:addNumbers xmlns:ns1="http://duke.org/">
> <arg0 xmlns="http://duke.org/">1</arg0>
> <arg1 xmlns="http://duke.org/">2</arg1>
> </ns1:addNumbers>
> </soap:Body>
> </soap:Envelope>
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.