[ 
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.

Reply via email to