On Monday 27 October 2008 5:51:17 am Roland Carlsson wrote:
> I have a webservice that are generated from a wsdl-file. When I compare my
> code with the examples they doesn't seem to work in the same way. The
> problem is that I don't get methods to get the responseObject. wsdl2java
> genereates a class called EstateObject but the other classes doesn't seem
> to use it and I don't find the way.

I'm not sure what the problem is......  

JAXB will generate classes for everything in the schema, even if nothing 
really uses it.   Thus, if you have an EstateObject type in the schema, it 
will get generated.


> Below is the client-code generated by wsdl2java and the output from that. I
> could send the wsdl if asked for (if there no obvious solution to my
> problem.

The code below all looks "normal" for generated code.   You'd need to be more 
specific about what you are looking for.

Dan


>
> Thannk in advance
> Roland
>
>
> I generated the code from SoapUI - generate CFX classes.
> It generated the following code below (I have added line 51 and 53).
>
> -------------------------
> public static void main(String args[]) throws Exception {
>         URL wsdlURL = Fast3KObject.WSDL_LOCATION;
>         if (args.length > 0) {
>             File wsdlFile = new File(args[0]);
>             try {
>                 if (wsdlFile.exists()) {
>                     wsdlURL = wsdlFile.toURI().toURL();
>                 } else {
>                     wsdlURL = new URL(args[0]);
>                 }
>             } catch (MalformedURLException e) {
>                 e.printStackTrace();
>             }
>         }
>
>         Fast3KObject ss = new Fast3KObject(wsdlURL, SERVICE_NAME);
>         Fast3KObjectSoap port = ss.getFast3KObjectSoap();
>
>         {
>         System.out.println("Invoking getObject...");
>         java.lang.String _getObject_objectNo = "547200";
>
> se.redpill.alfresco.module.jkp.wsclient.fast3k.GetObjectResponse.GetObjectR
>esult _getObject__return = port.getObject(_getObject_objectNo);
>         System.out.println("getObject.result=" + _getObject__return);
>         System.out.println("any=" + _getObject__return.any);
>
>         System.out.println("KLAR");
>         }
>
>         System.exit(0);
>     }
>
> ----------------------------------
>
> and that generates the following output.
>
> -------------------------------
> 2008-okt-27 10:36:37 org.apache.cxf.bus.spring.BusApplicationContext
> getConfigResources
> INFO: No cxf.xml configuration file detected, relying on defaults.
> Invoking getObject...
> getObject.result=se.redpill.alfresco.module.jkp.wsclient.fast3k.GetObjectRe
>[EMAIL PROTECTED] any=[diffgr:diffgram: null]
> KLAR
> ------------------------



-- 
Daniel Kulp
[EMAIL PROTECTED]
http://dankulp.com/blog

Reply via email to