无法创建weblogic提供的webservice客户端

时间:2014-10-22 06:31:37

标签: java web-services java-ee weblogic

使用weblogic 12c - 从wsdl url创建webservice客户端时出现以下错误。 URL ile alive还有什么问题?

Error loading [http://localhost:7001/app/AppDetailsEndPointService?wsdl]: 
org.apache.xmlbeans.XmlException: org.apache.xmlbeans.XmlException: error: Illegal XML character: 0x0 
org.apache.xmlbeans.impl.piccolo.io.IllegalCharException: Illegal XML character: 0x0 at 
org.apache.xmlbeans.impl.piccolo.xml.UTF8XMLDecoder.decode(UTF8XMLDecoder.java:196) at 
org.apache.xmlbeans.impl.piccolo.xml.XMLStreamReader$FastStreamDecoder.read(XMLStreamReader.java:762 
at org.apache.xmlbeans.impl.piccolo.xml.XMLStreamReader.read(XMLStreamReader.java:162) at
org.apache.xmlbeans.impl.piccolo.xml.PiccoloLexer.yy_refill(PiccoloLexer.java:3474) at 
org.apache.xmlbeans.impl.piccolo.xml.PiccoloLexer.yylex(PiccoloLexer.java:3958) at 
org.apache.xmlbeans.impl.piccolo.xml.Piccolo.yylex(Piccolo.java:1290) at 
org.apache.xmlbeans.impl.piccolo.xml.Piccolo.yyparse(Piccolo.java:1400) at 
org.apache.xmlbeans.impl.piccolo.xml.Piccolo.parse(Piccolo.java:714) at 
org.apache.xmlbeans.impl.store.Locale$SaxLoader.load(Locale.java:3454) at 
org.apache.xmlbeans.impl.store.Locale.parseToXmlObject(Locale.java:1276) at 
org.apache.xmlbeans.impl.store.Locale.parseToXmlObject(Locale.java:1263) at 
org.apache.xmlbeans.impl.schema.SchemaTypeLoaderBase.parse(SchemaTypeLoaderBase.java:345) at 
org.apache.xmlbeans.XmlObject$Factory.parse(XmlObject.java:663) at 
com.eviware.soapui.support.xml.XmlUtils.createXmlObject(XmlUtils.java:253) at 
com.eviware.soapui.impl.wsdl.support.wsdl.WsdlLoader.readCleanWsdlFrom(WsdlLoader.java:147) at 
com.eviware.soapui.impl.wsdl.support.wsdl.WsdlLoader.loadXmlObject(WsdlLoader.java:116) at 
com.eviware.soapui.impl.wsdl.support.xsd.SchemaUtils.getDefinitionParts(SchemaUtils.java:539) at 
com.eviware.soapui.impl.wsdl.support.xsd.SchemaUtils.getDefinitionParts(SchemaUtils.java:528) at 
com.eviware.soapui.impl.support.definition.support.AbstractDefinitionCache.update(AbstractDefinitionCache.java:101) at 
com.eviware.soapui.impl.support.definition.support.AbstractDefinitionContext$Loader.construct(AbstractDefinitionContext.java:240) at 
com.eviware.soapui.support.swing.SwingWorkerDelegator.construct(SwingWorkerDelegator.java:50) at 
com.eviware.soapui.support.swing.SwingWorker$2.run(SwingWorker.java:153) at 
java.lang.Thread.run(Unknown Source)   

的pom.xml:

    <dependency>
        <groupId>javax.xml.ws</groupId>
        <artifactId>jaxws-api</artifactId>
        <version>2.2.8</version>
    </dependency>
    <dependency>
        <groupId>com.sun.xml.ws</groupId>
        <artifactId>jaxws-rt</artifactId>
        <version>2.2.7</version>
    </dependency>

的web.xml:

 <listener>
    <listener-class>
            com.sun.xml.ws.transport.http.servlet.WSServletContextListener
    </listener-class>
</listener>
<servlet>
    <servlet-name>appuser</servlet-name>
    <servlet-class>com.sun.xml.ws.transport.http.servlet.WSServlet</servlet-class>
    <load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
    <servlet-name>appuser</servlet-name>
    <url-pattern>/soap/user/appuser</url-pattern>
</servlet-mapping>
<session-config>
    <session-timeout>120</session-timeout>
</session-config>

1 个答案:

答案 0 :(得分:4)

我发现了这个问题。这是因为SOAP-UI上的代理设置,在停用后,我可以创建WS客户端并发送/接收成功的SOAP请求/响应。