cxf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Daniel Kulp (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CXF-4754) Invalid client code generation of wsdl2java with -wsdlList option
Date Thu, 24 Jan 2013 17:33:12 GMT

    [ https://issues.apache.org/jira/browse/CXF-4754?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13561785#comment-13561785
] 

Daniel Kulp commented on CXF-4754:
----------------------------------


You are taking two very different schemas that use the same targetNamespace and trying to
generate them into the exact same package.   This is not supported.  It's also not a good
idea to have two schemas/services that use the same namespace but are completely different.
  

In the first case, you are using a unique package for each of the two services.  That works
fine.     
                
> Invalid client code generation of wsdl2java with -wsdlList option
> -----------------------------------------------------------------
>
>                 Key: CXF-4754
>                 URL: https://issues.apache.org/jira/browse/CXF-4754
>             Project: CXF
>          Issue Type: Bug
>    Affects Versions: 2.6.5, 2.7.2
>         Environment: Mac OS X, version 10.6.8
> JDK 1.6.0
>            Reporter: Vasiliy Bout
>            Priority: Critical
>         Attachments: condorCollector.wsdl, condorSchedd.wsdl, wsdl.list
>
>
> I tried to build a client for the Web Service (WS) of HTCondor GRID system ([http://research.cs.wisc.edu/htcondor/]).
> They have two WSDL files, that come with original tar.gz downloadable file. I have used
HTCondor version 7.8.7. You can find two WSDL files in subfolder "lib/webservice": they are
"condorCollector.wsdl" and "condorSchedd.wsdl".
> When I create client Java code with the following commands:
> {noformat}
> wsdl2java -frontend jaxws21 -client -V -compile \
>     -classdir out/classes -d out -wsdlLocation '' \
>     -p org.htcondor.collector    condorCollector.wsdl
> wsdl2java -frontend jaxws21 -client -V -compile \
>     -classdir out/classes -d out -wsdlLocation '' \
>     -p org.htcondor.schedd      condorSchedd.wsdl
> {noformat}
> then compiled code behaves as expected. By default, WS address is specified as localhost:80
in WSDL file, so when I try to launch the client on clean machine (without HTCondor installed):
> {noformat}
> java -cp out/classes org.htcondor.collector.CondorCollectorPortType_CondorCollector_Client
condorCollector.wsdl
> {noformat}
> ... then I simply get connection error. It is ok.
> But If I generate client Java code with the following command:
> {noformat}
> wsdl2java -frontend jaxws21 -client -V -compile \
>     -classdir out/classes -d out -wsdlLocation '' \
>     -p org.htcondor      -wsdlList   wsdl.list
> {noformat}
> ... with "wsdl.list" file containing two lines:
> {noformat}
> condorCollector.wsdl
> condorSchedd.wsdl
> {noformat}
> ... and then launch the client with the following command:
> {noformat}
> java -cp out/classes org.htcondor.CondorCollectorPortType_CondorCollector_Client condorCollector.wsdl
> {noformat}
> ... then I get the following exception:
> {noformat}
> Exception in thread "main" javax.xml.ws.WebServiceException: Unable to create JAXBContext
> 	at com.sun.xml.internal.ws.model.AbstractSEIModelImpl.createJAXBContext(AbstractSEIModelImpl.java:153)
> 	at com.sun.xml.internal.ws.model.AbstractSEIModelImpl.postProcess(AbstractSEIModelImpl.java:83)
> 	at com.sun.xml.internal.ws.model.RuntimeModeler.buildRuntimeModel(RuntimeModeler.java:244)
> 	at com.sun.xml.internal.ws.client.WSServiceDelegate.createSEIPortInfo(WSServiceDelegate.java:687)
> 	at com.sun.xml.internal.ws.client.WSServiceDelegate.addSEI(WSServiceDelegate.java:675)
> 	at com.sun.xml.internal.ws.client.WSServiceDelegate.getPort(WSServiceDelegate.java:330)
> 	at com.sun.xml.internal.ws.client.WSServiceDelegate.getPort(WSServiceDelegate.java:313)
> 	at com.sun.xml.internal.ws.client.WSServiceDelegate.getPort(WSServiceDelegate.java:295)
> 	at javax.xml.ws.Service.getPort(Service.java:92)
> 	at org.htcondor.CondorCollector.getCondorCollector(CondorCollector.java:50)
> 	at org.htcondor.CondorCollectorPortType_CondorCollector_Client.main(CondorCollectorPortType_CondorCollector_Client.java:50)
> Caused by: java.security.PrivilegedActionException: com.sun.xml.internal.bind.v2.runtime.IllegalAnnotationsException:
7 counts of IllegalAnnotationExceptions
> There's no ObjectFactory with an @XmlElementDecl for the element {}constraint.
> 	this problem is related to the following location:
> 		at protected javax.xml.bind.JAXBElement org.htcondor.QuerySubmittorAds.constraint
> 		at org.htcondor.QuerySubmittorAds
> There's no ObjectFactory with an @XmlElementDecl for the element {}constraint.
> 	this problem is related to the following location:
> 		at protected javax.xml.bind.JAXBElement org.htcondor.QueryAnyAds.constraint
> 		at org.htcondor.QueryAnyAds
> There's no ObjectFactory with an @XmlElementDecl for the element {}constraint.
> 	this problem is related to the following location:
> 		at protected javax.xml.bind.JAXBElement org.htcondor.QueryLicenseAds.constraint
> 		at org.htcondor.QueryLicenseAds
> There's no ObjectFactory with an @XmlElementDecl for the element {}constraint.
> 	this problem is related to the following location:
> 		at protected javax.xml.bind.JAXBElement org.htcondor.QueryStorageAds.constraint
> 		at org.htcondor.QueryStorageAds
> There's no ObjectFactory with an @XmlElementDecl for the element {}constraint.
> 	this problem is related to the following location:
> 		at protected javax.xml.bind.JAXBElement org.htcondor.QueryMasterAds.constraint
> 		at org.htcondor.QueryMasterAds
> There's no ObjectFactory with an @XmlElementDecl for the element {}constraint.
> 	this problem is related to the following location:
> 		at protected javax.xml.bind.JAXBElement org.htcondor.QueryStartdAds.constraint
> 		at org.htcondor.QueryStartdAds
> There's no ObjectFactory with an @XmlElementDecl for the element {}constraint.
> 	this problem is related to the following location:
> 		at protected javax.xml.bind.JAXBElement org.htcondor.QueryScheddAds.constraint
> 		at org.htcondor.QueryScheddAds
> 	at java.security.AccessController.doPrivileged(Native Method)
> 	at com.sun.xml.internal.ws.model.AbstractSEIModelImpl.createJAXBContext(AbstractSEIModelImpl.java:140)
> 	... 10 more
> Caused by: com.sun.xml.internal.bind.v2.runtime.IllegalAnnotationsException: 7 counts
of IllegalAnnotationExceptions
> There's no ObjectFactory with an @XmlElementDecl for the element {}constraint.
> 	this problem is related to the following location:
> 		at protected javax.xml.bind.JAXBElement org.htcondor.QuerySubmittorAds.constraint
> 		at org.htcondor.QuerySubmittorAds
> There's no ObjectFactory with an @XmlElementDecl for the element {}constraint.
> 	this problem is related to the following location:
> 		at protected javax.xml.bind.JAXBElement org.htcondor.QueryAnyAds.constraint
> 		at org.htcondor.QueryAnyAds
> There's no ObjectFactory with an @XmlElementDecl for the element {}constraint.
> 	this problem is related to the following location:
> 		at protected javax.xml.bind.JAXBElement org.htcondor.QueryLicenseAds.constraint
> 		at org.htcondor.QueryLicenseAds
> There's no ObjectFactory with an @XmlElementDecl for the element {}constraint.
> 	this problem is related to the following location:
> 		at protected javax.xml.bind.JAXBElement org.htcondor.QueryStorageAds.constraint
> 		at org.htcondor.QueryStorageAds
> There's no ObjectFactory with an @XmlElementDecl for the element {}constraint.
> 	this problem is related to the following location:
> 		at protected javax.xml.bind.JAXBElement org.htcondor.QueryMasterAds.constraint
> 		at org.htcondor.QueryMasterAds
> There's no ObjectFactory with an @XmlElementDecl for the element {}constraint.
> 	this problem is related to the following location:
> 		at protected javax.xml.bind.JAXBElement org.htcondor.QueryStartdAds.constraint
> 		at org.htcondor.QueryStartdAds
> There's no ObjectFactory with an @XmlElementDecl for the element {}constraint.
> 	this problem is related to the following location:
> 		at protected javax.xml.bind.JAXBElement org.htcondor.QueryScheddAds.constraint
> 		at org.htcondor.QueryScheddAds
> 	at com.sun.xml.internal.bind.v2.runtime.IllegalAnnotationsException$Builder.check(IllegalAnnotationsException.java:91)
> 	at com.sun.xml.internal.bind.v2.runtime.JAXBContextImpl.getTypeInfoSet(JAXBContextImpl.java:436)
> 	at com.sun.xml.internal.bind.v2.runtime.JAXBContextImpl.<init>(JAXBContextImpl.java:277)
> 	at com.sun.xml.internal.bind.v2.runtime.JAXBContextImpl$JAXBContextBuilder.build(JAXBContextImpl.java:1100)
> 	at com.sun.xml.internal.bind.v2.ContextFactory.createContext(ContextFactory.java:143)
> 	at com.sun.xml.internal.bind.api.JAXBRIContext.newInstance(JAXBRIContext.java:95)
> 	at com.sun.xml.internal.ws.developer.JAXBContextFactory$1.createJAXBContext(JAXBContextFactory.java:97)
> 	at com.sun.xml.internal.ws.model.AbstractSEIModelImpl$1.run(AbstractSEIModelImpl.java:148)
> 	at com.sun.xml.internal.ws.model.AbstractSEIModelImpl$1.run(AbstractSEIModelImpl.java:140)
> 	... 12 more
> {noformat}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message