1

私はいつもエラーが発生します

HTTP Status 500 - Request processing failed; nested exception is org.springframework.ws.soap.saaj.SaajSoapEnvelopeException: Could not access envelope: Unable to create envelope from given source: ; nested exception is com.sun.xml.internal.messaging.saaj.SOAPExceptionImpl: Unable to create envelope from given source:

次のような2つの複雑なタイプでsoapRequestを実行しようとすると:

<xs:element name="blub">
    <xs:complexType>
        <xs:sequence>
            <xs:element name="mainheader" type="header" />
            <xs:element name="mainbody" type="body" />
        </xs:sequence>
    </xs:complexType>
</xs:element>

Marshaller として org.springframework.oxm.jaxb.Jaxb2Marshaller を使用し、xsd には org.springframework.xml.xsd.commons.CommonsXsdSchemaCollection を使用します。

誰にもアイデアがありますか?

4

1 に答える 1

0

あなたは欠けているかもしれませんsoap:Envelope

<?xml version="1.0"?>
<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope">
  <soap:Header>
  </soap:Header>
  <soap:Body>
    <m:GetStockPrice xmlns:m="http://www.example.org/stock">
      <m:StockName>IBM</m:StockName>
    </m:GetStockPrice>
  </soap:Body>
</soap:Envelope>
于 2012-10-03T00:30:20.410 に答える