Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/google-sheets/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
WSDL导致WSDLToJava生成失败的代码_Java_Jax Ws_Cxf - Fatal编程技术网

WSDL导致WSDLToJava生成失败的代码

WSDL导致WSDLToJava生成失败的代码,java,jax-ws,cxf,Java,Jax Ws,Cxf,我有以下wsdl文件:- <?xml version="1.0" encoding="UTF-8"?> <definitions xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="http://schema.intersec.com/igloo/push/v1.2" targetNamespace="htt

我有以下wsdl文件:-

<?xml version="1.0" encoding="UTF-8"?>

<definitions xmlns="http://schemas.xmlsoap.org/wsdl/"
    xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="http://schema.intersec.com/igloo/push/v1.2"
    targetNamespace="http://schema.intersec.com/igloo/push/v1.2">

    <!-- WSDL types -->
    <types>
        <schema targetNamespace="http://schema.intersec.com/igloo/push/v1.2"
            xmlns="http://www.w3.org/2001/XMLSchema">
            <complexType name="push.EventV2">
                <sequence>
                    <element name="cgi" minOccurs="0" type="string" />
                </sequence>
            </complexType>

            <!-- RPC arguments types -->
            <!-- Fails if i have this -->
            <!-- <element name="events.eventV2Req" type="tns:push.EventV2" /> -->
            <!-- Works if i have this -->
            <element name="events.eventV2Req" type="string"/>
        </schema>
    </types>

    <!-- WSDL Messages -->
    <message name="events.eventV2Req">
        <part name="parameters" element="tns:events.eventV2Req" />
    </message>

    <!-- WSDL Ports -->
    <portType name="push.PushPortType">
    <operation name="events.eventV2">
      <input message="tns:events.eventV2Req" />
    </operation>
  </portType>

  <!-- WSDL Bindings -->
  <binding name="push.PushBinding" type="tns:push.PushPortType">
    <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http" />
    <operation name="events.eventV2">
      <soap:operation soapAction="" />
      <input>
        <soap:body use="literal" />
      </input>
    </operation>
  </binding>

  <!-- WSDL Services -->
  <service name="push.Push">
    <port name="push.PushEndPoint" binding="tns:push.PushBinding">
      <soap:address location="http://localhost:10700/Igloo/push.Push" />
    </port>
  </service>
</definitions>
有人知道wsdl或jaxws有什么问题吗

我正在使用:-

  • java 1.6.0_31-b05
  • cxf 2.4.6
  • 码头7.4.5

有什么想法吗?

在客户端代码中,有以下行:-

com.intersec.schema.igloo.push.v1.PushEventV2 _eventsEventV2_parameters = null;
如果我将此更改为:-

com.intersec.schema.igloo.push.v1.PushEventV2 _eventsEventV2_parameters 
    = new ObjectFactory().createPushEventV2();
它起作用了

我猜如果参数为null,它找不到要调用的方法

我想知道这是jaxws中的错误吗

19-Feb-2013 16:44:06 org.apache.cxf.service.invoker.AbstractInvoker invoke
SEVERE: Invocation without a binding operation.
19-Feb-2013 16:44:06 org.apache.cxf.phase.PhaseInterceptorChain doDefaultLogging
WARNING: Interceptor for {http://schema.intersec.com/igloo/push/v1.2}push.Push has thrown exception, unwinding now
org.apache.cxf.interceptor.Fault: No binding operation info while invoking unknown method with params unknown.
    at org.apache.cxf.service.invoker.AbstractInvoker.invoke(AbstractInvoker.java:60)
    at org.apache.cxf.interceptor.ServiceInvokerInterceptor$1.run(ServiceInvokerInterceptor.java:58)
    at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
    at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
    at java.util.concurrent.FutureTask.run(Unknown Source)
    at org.apache.cxf.workqueue.SynchronousExecutor.execute(SynchronousExecutor.java:37)
    at org.apache.cxf.interceptor.ServiceInvokerInterceptor.handleMessage(ServiceInvokerInterceptor.java:106)
    at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:263)
    at org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:121)
    at org.apache.cxf.transport.http_jetty.JettyHTTPDestination.serviceRequest(JettyHTTPDestination.java:319)
    at org.apache.cxf.transport.http_jetty.JettyHTTPDestination.doService(JettyHTTPDestination.java:287)
    at org.apache.cxf.transport.http_jetty.JettyHTTPHandler.handle(JettyHTTPHandler.java:72)
    at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:939)
    at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:875)
    at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:117)
    at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:247)
    at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:110)
    at org.eclipse.jetty.server.Server.handle(Server.java:346)
    at org.eclipse.jetty.server.HttpConnection.handleRequest(HttpConnection.java:589)
    at org.eclipse.jetty.server.HttpConnection$RequestHandler.content(HttpConnection.java:1065)
    at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:823)
    at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:220)
    at org.eclipse.jetty.server.HttpConnection.handle(HttpConnection.java:411)
    at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:535)
    at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:40)
    at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:529)
    at java.lang.Thread.run(Unknown Source)
com.intersec.schema.igloo.push.v1.PushEventV2 _eventsEventV2_parameters = null;
com.intersec.schema.igloo.push.v1.PushEventV2 _eventsEventV2_parameters 
    = new ObjectFactory().createPushEventV2();