Announcement Announcement Module
No announcement yet.
Endpoint Request Data Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • Endpoint Request Data

    We have a SOAP request to a Spring web service that is arriving at the endpoint but the data is not populated. Spring WS is in version 1.5.5 and we've also experienced this in 1.5.7. We're including JaxB 2.0.5

    The Request XML is

    <soapenv:Envelope xmlns:soapenv="" >
          <CanReceiptBeEditedRequest xmlns="">
    Spring allows the request to arrive at the end point but the JaxB Schema object request that is passed in doesn't have either the receipt or order number.

    First question is this a valid SOAP request? I'd guess it is if spring isn't complaining.

    I went ahead and added the XSD to the marshaller to enable validation.

    	<bean id="marshaller" class="org.springframework.oxm.jaxb.Jaxb2Marshaller">
    		<property name="contextPath"
    			value="com.anfcorp.rms.schemas.wms.receipt.messages.v1_0" />
    		<property name="schema" value="classpath:ReceiptsServiceMessages.xsd"/>
    And now I receive this in response to sending my request....

    JAXB unmarshalling exception: null; nested exception is javax.xml.bind.UnmarshalException
    - with linked exception:
    [org.xml.sax.SAXParseException: cvc-complex-type.2.4.a: Invalid content was found starting with element 'receiptNumber'. One of '{"":receiptNumber}' is expected.]

    So it's not valid? What is the correct format? We can add the namespace to the envelope that makes it work, but I'm not clear on why the example above isn't a valid request, or so invalid that spring should complain.

    I've attached a snippet of my XSD.

    <xs:schema targetNamespace=""
    	xmlns:xs="" xmlns:receipt=""
    	xmlns:po="" xmlns:tn="">
    	<xs:element name="CanReceiptBeEditedRequest">
    				<xs:element name="receiptNumber" type="xs:long"
    					minOccurs="1" maxOccurs="1" />
    				<xs:element name="orderNumber" type="xs:long" minOccurs="1"
    					maxOccurs="1" />