Hi,

maybe ask cxf mailing list

but a simple test if you have an interface is to use jaxws API:

Service s = Service.create(wsdlUrl, qname);
MyInterface i = s.getPort(MyInterface.class);
i.someBusinessMethod();

*Romain Manni-Bucau*
*Twitter: @rmannibucau <https://twitter.com/rmannibucau>*
*Blog: **http://rmannibucau.wordpress.com/*<http://rmannibucau.wordpress.com/>
*LinkedIn: **http://fr.linkedin.com/in/rmannibucau*
*Github: https://github.com/rmannibucau*




2012/10/17 Poindexter, Miles <[email protected]>

> Hi,
> This is probably a basic CXF question but maybe you guys can help.
> I have a simple SOAP service running in TomEE+ which generates its own
> wsdl based on some annotated java code.
> This was created using this example:
> http://openejb.apache.org/examples-trunk/simple-webservice/
>
> This works great for stuff like SoapUI.  They have no problem with the
> service. So I think the service creating valid xml.
>
> But when I create a simple command-line client using CXF 2.6.2, and
> generating the stubs using wsdl2java from the above mentioned wsdl.
> None of the requests work!!
> The only flag I use with wsdl2java when generating the code is:  -client
>
> I always get some variation of this type of error:
> [javax.xml.bind.UnmarshalException: unexpected element (uri:"",
> local:"jobControl"). Expected elements are <{
> http://dsa.cn.com/wsdl}jobControl>]
>
> I can see on the generated wsdl this:
> <xs:schema  elementFormDefault="unqualified" targetNamespace="
> http://dsa.cn.com/wsdl"; version="1.0" xmlns:tns="http://dsa.cn.com/wsdl";
> xmlns:xs="http://www.w3.org/2001/XMLSchema";>
>
> And a sample of the response looks like this:
> <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/";>
>    <soap:Body>
>       <ns2:getJobControlsResponse xmlns:ns2="http://dsa.cn.com/wsdl";>
>          <return>
>             <jobControl id="a0ae00000000JoCAAU">
>                <jobStart>2012/11/1 00:00:00</jobStart>
>                <jobEnd>2012/11/1 23:59:59</jobEnd>
>                <rangeStart>0</rangeStart>
>                <rangeEnd>100</rangeEnd>
>                <jobNote>updated via SOAP</jobNote>
>                <jobStatus>START</jobStatus>
>             </jobControl>
>          . . .
>             <jobControl id="a0ae00000000JspAAE">
>                <jobStart>2012/12/1 00:00:00</jobStart>
>                <jobEnd>2012/12/1 23:59:59</jobEnd>
>                <rangeStart>0</rangeStart>
>                <rangeEnd>500</rangeEnd>
>                <jobNote>via REST service</jobNote>
>                <jobStatus>START</jobStatus>
>             </jobControl>
>          </return>
>       </ns2:getJobControlsResponse>
>    </soap:Body>
> </soap:Envelope>
>
> So I don't know which is wrong, the client or the service??
> Do the job <jobControl> elements need the namespace prepended to them?  Or
> is that not necessary since elementFormDefault="unqualified"?
> The problem is, I don't understand the error msg that the client is giving
> me, since I don't think it should be expecting the uri it is expecting.
> Is there a simple modification to either the service or the client to fix
> this?
>
> Miles
>
> --
> Miles Poindexter
> Data & Service Architecture
> Condé Nast
> ph: 212-790-6692
> mobile: 347-967-8944
> fax: 212-790-1891
> [email protected]
> <applewebdata://6D7C2D39-4D16-42A7-8457-9A8FCE0ED464/
> [email protected]>
>
>
>

Reply via email to