0

こんにちは、Java を使用して Web サービスを呼び出していますが、次のエラーが発生します。

  SEVERE: Exception:
org.xml.sax.SAXException: Invalid element in iseries.wsbeans.createbiditem.xsd.CreateBidItemResponse - BidItem
    at org.apache.axis.encoding.ser.BeanDeserializer.onStartChild(BeanDeserializer.java:258)
    at org.apache.axis.encoding.DeserializationContext.startElement(DeserializationContext.java:1035)
    at org.apache.axis.message.SAX2EventRecorder.replay(SAX2EventRecorder.java:165)
    at org.apache.axis.message.MessageElement.publishToHandler(MessageElement.java:1141)
    at org.apache.axis.message.RPCElement.deserialize(RPCElement.java:236)
    at org.apache.axis.message.RPCElement.getParams(RPCElement.java:384)
    at org.apache.axis.client.Call.invoke(Call.java:2467)
    at org.apache.axis.client.Call.invoke(Call.java:2366)
    at org.apache.axis.client.Call.invoke(Call.java:1812)
    at p6devc01.p6devc.service.basicsite.services.soap.CreateBidItemSoapBindingStub.createBidItem(CreateBidItemSoapBindingStub.java:192)
    at p6devc01.p6devc.service.basicsite.services.soap.CreateBidItemPortTypeProxy.createBidItem(CreateBidItemPortTypeProxy.java:50)
    at stocklistCreateBid.test.createBidItem(test.java:49)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at org.apache.axis.providers.java.RPCProvider.invokeMethod(RPCProvider.java:397)
    at org.apache.axis.providers.java.RPCProvider.processMessage(RPCProvider.java:186)
    at org.apache.axis.providers.java.JavaProvider.invoke(JavaProvider.java:323)
    at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:32)
    at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118)
    at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83)
    at org.apache.axis.handlers.soap.SOAPService.invoke(SOAPService.java:454)
    at org.apache.axis.server.AxisServer.invoke(AxisServer.java:281)
    at org.apache.axis.transport.http.AxisServlet.doPost(AxisServlet.java:699)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:647)
    at org.apache.axis.transport.http.AxisServletBase.service(AxisServletBase.java:327)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
    at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99)
    at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:947)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)
    at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1009)
    at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:589)
    at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:310)
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)

SoapUI から Web サービスを呼び出すと、問題なく動作します。エラーで言及されている xsd ファイルは次のとおりです。

  <?xml version="1.0" encoding="utf-8" ?> 
- <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" targetNamespace="http://createbiditem.wsbeans.iseries/xsd" elementFormDefault="qualified" attributeFormDefault="unqualified">
- <xs:element name="CreateBidItemRequest">
- <xs:complexType>
- <xs:sequence>
- <xs:element name="Input" minOccurs="1" maxOccurs="1">
- <xs:complexType>
- <xs:sequence>
- <xs:element name="Log" minOccurs="1" maxOccurs="1">
- <xs:complexType>
- <xs:sequence>
  <xs:element name="LogKey" type="xs:string" minOccurs="1" maxOccurs="1" /> 
  <xs:element name="UserId" type="xs:string" minOccurs="1" maxOccurs="1" /> 
  </xs:sequence>
  </xs:complexType>
  </xs:element>
- <xs:element name="Input" minOccurs="1" maxOccurs="1">
- <xs:complexType>
- <xs:sequence>
  <xs:element name="BIDOperationsItemId" type="xs:string" minOccurs="1" maxOccurs="1" /> 
  <xs:element name="BidPriceGroupOperationsItemId" type="xs:string" minOccurs="1" maxOccurs="1" /> 
  <xs:element name="CustomerBidNumber" type="xs:string" minOccurs="1" maxOccurs="1" /> 
  <xs:element name="OperationsItemSubTypeCode" type="xs:string" minOccurs="1" maxOccurs="1" /> 
  <xs:element name="StockOrderGroup" type="xs:string" minOccurs="1" maxOccurs="1" /> 
  </xs:sequence>
  </xs:complexType>
  </xs:element>
  </xs:sequence>
  </xs:complexType>
  </xs:element>
  </xs:sequence>
  </xs:complexType>
  </xs:element>
- <xs:element name="CreateBidItemResponse">
- <xs:complexType>
- <xs:sequence>
- <xs:element name="BidItem" minOccurs="1" maxOccurs="1">
- <xs:complexType>
- <xs:sequence>
  <xs:element name="BidItemKnownBy" type="xs:string" minOccurs="1" maxOccurs="1" /> 
  </xs:sequence>
  </xs:complexType>
  </xs:element>
  </xs:sequence>
  </xs:complexType>
  </xs:element>
  </xs:schema>

エラーは、無効な応答要素と関係があることを示していますが、何ですか? なぜこれが起こるのでしょうか? javaではなくsoapUIで動作するのはなぜですか? ありがとうございました

4

1 に答える 1

0

Web サービスを再作成しましたが、現在は機能しているようです。SoapUI で機能した理由はわかりませんが、ありがとうございます。

于 2013-05-24T07:00:35.157 に答える