locked
Possible SOAP version mismatch: Envelope namespace RRS feed

  • Question

  • User-537401886 posted

    We have implemented a Web Service (Using Visual Studio .asmx file) and when we try to POST the client given XML (With Firefox Poster) we get the error:

    soap:VersionMismatchSystem.Web.Services.Protocols.SoapException: Possible SOAP version mismatch: Envelope namespace client.Namespace was unexpected. Expecting http://schemas.xmlsoap.org/soap/envelope/.

    Is there a way in Visual Studio webservices to change the validation xsd or to ignore the validation at all? Is there a way to change the Webservice line below through Visual Studio?

    <soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">

    Keep in mind that the client cannot change the xml request….

    Wednesday, August 9, 2017 1:10 PM

All replies

  • User1168443798 posted

    Hi mm_dev,

    Could you share us a simple demo which could reproduce your issue?

    What is your client XML request?

    What is the difference between your client request and expected client request?

    Best Regards,

    Edward

    Thursday, August 10, 2017 5:43 AM
  • User-537401886 posted

    Dear Edward,

    The web service we try to consume is from SAP. We only have the .xsd file and a samle request .xml file. The header of the asmx file is:

    POST /read.asmx HTTP/1.1
    Host: localhost
    Content-Type: text/xml; charset=utf-8
    Content-Length: length
    SOAPAction: "urn.client:mmm.ggg.glads.Instruction/read"

    <?xml version="1.0" encoding="utf-8"?>
    <soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
      <soap:Body>
          <Instruction xmlns="urn.client:mmm.ggg.glads.Instruction">
             <Header>

    And the demo XML we are posting and we get the error (Possible SOAP version mismatch: Envelope namespace urn.client:mmm.ggg.glads.Instruction was unexpected. Expecting http://schemas.xmlsoap.org/soap/envelope/)

    Demo XML request

    <?xml version="1.0" encoding="UTF-8"?>
    <ns0:Instruction xmlns:ns0="urn.client:mmm.ggg.glads.Instruction"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="urn.client:mmm.ggg.glads.Instruction file:/C:/Users/Instruction.xsd">
    <ns0:Header>

    Friday, August 11, 2017 5:48 PM
  • User1168443798 posted

    Hi mm_dev,

    Could you help to clear below points?

    1. In your original post, you implemented the web service, but in your follow up, the web service is from SAP. Which is your service?

    2. Per to your follow up, you have the sample request .xml, if you send the request by Fiddler or PostMan, will it work?

    3. Do you have working xml request?

    It seems the request and the service are not developed by you, and you could not provide any more information except the .xsd file and sample request. If so, I am afraid it is very less we could help, and you need to confirm with the service developer for how to make a right request.

    Best Regards,

    Edward

    Monday, August 14, 2017 2:37 AM
  • User-537401886 posted

    Dear Edward,

    Thanks for the reply!

    1. You are right I was not clear, the request comes from SAP and we have implemented the web service.
    2. Yes we have a sample xml request (from SAP) and we have also used fiddler and the error is ‘Possible SOAP version mismatch: Envelope namespace…’
    3. We have a working xml request that SAP uses to trigger our web service.

    I am sending you the xml sample, the vb class generated from the xml and the sample web service

    1. xml sample

    <?xml version="1.0" encoding="utf-8"?>
    <nm:PIMessageInstruction xmlns:nm="urn.client:mmm.ggg.glads.MessageInstruction" xmlns:prx="urn:sap.com:proxy:R3Q:/1SAI/TASFBC4BB4E5682A6E2540F:702">
      <ne:Header xmlns:ne="urn.client:mmm.ggg.glads.MessageInstruction">
        <n0:TransactionType xmlns:n0="urn.client:mmm.ggg.glads.MessageInstruction">MESSAGEINSTRUCTION</n0:TransactionType>
        <n0:SenderID xmlns:n0="urn.client:mmm.ggg.glads.MessageInstruction">SAP</n0:SenderID>
        <n0:ReceiverID xmlns:n0="urn.client:mmm.ggg.glads.MessageInstruction">CARR</n0:ReceiverID>
        <n0:BatchNumber xmlns:n0="urn.client:mmm.ggg.glads.MessageInstruction">2</n0:BatchNumber>
        <n0:BatchIndicator xmlns:n0="urn.client:mmm.ggg.glads.MessageInstruction">1/1,49,49/49</n0:BatchIndicator>
        <n0:TransactionDate xmlns:n0="urn.client:mmm.ggg.glads.MessageInstruction">2017-08-08</n0:TransactionDate>
        <n0:TransactionTime xmlns:n0="urn.client:mmm.ggg.glads.MessageInstruction">10:24:54</n0:TransactionTime>
        <n0:EnvironmentIdentifier xmlns:n0="urn.client:mmm.ggg.glads.MessageInstruction">Q</n0:EnvironmentIdentifier>
        <n0:TransactionCount xmlns:n0="urn.client:mmm.ggg.glads.MessageInstruction">1</n0:TransactionCount>
      </ne:Header>
      <n0:ShippingInstructions xmlns:n0="urn.client:mmm.ggg.glads.MessageInstruction">
        <n0:TransactionReferenceId>0000000098745534</n0:TransactionReferenceId>
        <ne:ShipmentHeader xmlns:ne="urn.client:mmm.ggg.glads.MessageInstruction">
          <n0:ActionCode>A</n0:ActionCode>
          <ne:Shipment>
            <n0:ShipmentIdentificationNumber>18443469541</n0:ShipmentIdentificationNumber>
            <n0:EDIdentificationNumber>380549190</n0:EDIdentificationNumber>
            <n0:ShipmentMethodofPayment>PP</n0:ShipmentMethodofPayment>
            <n0:ShipmentType>4</n0:ShipmentType>
            <n0:BillOfLadingType>O</n0:BillOfLadingType>
          </ne:Shipment>
          <ne:VesselDetail>
            <n0:VesselCode>9438717</n0:VesselCode>
            <n0:VoyageID>FRD323239081</n0:VoyageID>
          </ne:VesselDetail>
          <ne:PortDetails>
            <n0:POLISOCode>POL</n0:POLISOCode>
            <n0:POLName>MY POLNAME</n0:POLName>
            <n0:PODISOCode>POD</n0:PODISOCode>
            <n0:PODName>MY PODNAME</n0:PODName>
            <n0:BookingNumber>MM</n0:BookingNumber>
          </ne:PortDetails>
          <n0:ContactParty>
            <n0:EntityIdentifierCode>FW</n0:EntityIdentifierCode>
            <n0:Name1>NAME 1</n0:Name1>
            <n0:Address1>ADDRESS 1</n0:Address1>
            <n0:Address2>ADDRESS 2</n0:Address2>
            <n0:Contact>
              <n0:ContactFunctionCode>IC</n0:ContactFunctionCode>
              <n0:ContactName>CONTACT 1</n0:ContactName>
              <n0:ContactDetail>CONTACT1@HELLO.COM</n0:ContactDetail>
            </n0:Contact>
            <n0:Contact>
              <n0:ContactFunctionCode>PC</n0:ContactFunctionCode>
              <n0:ContactName>CONTACT 2</n0:ContactName>
              <n0:ContactDetail>CONTACT2@HELLO.com</n0:ContactDetail>
            </n0:Contact>
          </n0:ContactParty>
          <n0:ContactParty>
            <n0:EntityIdentifierCode>N1</n0:EntityIdentifierCode>
            <n0:Name1>NAME2</n0:Name1>
            <n0:Address1>ADDRESS 3</n0:Address1>
            <n0:Address2>ADDRESS 4</n0:Address2>
          </n0:ContactParty>
        </ne:ShipmentHeader>
        <n0:ShipmentItem>
          <n0:ActionCode>A</n0:ActionCode>
          <ne:VINDetails xmlns:ne="urn.client:mmm.ggg.glads.MessageInstruction">
            <n0:VINNumber>ABCDEFG1234567890</n0:VINNumber>
            <n0:LadingDescription>2016 MY VEHICLE CUSTOM VAN 270S 2.2D 100PS</n0:LadingDescription>
            <n0:VehicleLine>TVL TF</n0:VehicleLine>
            <n0:VehicleBodyCode>TCA VA</n0:VehicleBodyCode>
          </ne:VINDetails>
          <n0:Measure>
            <n0:MeasureQualifier>FT</n0:MeasureQualifier>
            <n0:Length>16.31</n0:Length>
            <n0:Width>6.52</n0:Width>
            <n0:Height>6.5</n0:Height>
          </n0:Measure>
          <n0:Measure>
            <n0:MeasureQualifier>M</n0:MeasureQualifier>
            <n0:Length>4.97</n0:Length>
            <n0:Width>1.99</n0:Width>
            <n0:Height>1.98</n0:Height>
          </n0:Measure>
          <n0:Weight>
            <n0:WeightQualifier>G</n0:WeightQualifier>
            <n0:WeightUnitCode>L</n0:WeightUnitCode>
            <n0:Weight>4211.0</n0:Weight>
          </n0:Weight>
          <n0:Weight>
            <n0:WeightQualifier>G</n0:WeightQualifier>
            <n0:WeightUnitCode>K</n0:WeightUnitCode>
            <n0:Weight>1910.0</n0:Weight>
          </n0:Weight>
          <n0:Volume>
            <n0:VolumeUnitQualifier>E</n0:VolumeUnitQualifier>
            <n0:Volume>690.0</n0:Volume>
          </n0:Volume>
          <n0:Volume>
            <n0:VolumeUnitQualifier>X</n0:VolumeUnitQualifier>
            <n0:Volume>19.55</n0:Volume>
          </n0:Volume>
          <n0:PackagingFormCode>VEH</n0:PackagingFormCode>
          <n0:HTSNumber>8704.21.91.00</n0:HTSNumber>
        </n0:ShipmentItem>
        <n0:ShipmentItem>
          <n0:ActionCode>A</n0:ActionCode>
          <ne:VINDetails xmlns:ne="urn.client:mmm.ggg.glads.MessageInstruction">
            <n0:VINNumber>ABCDEFG1234567891</n0:VINNumber>
            <n0:LadingDescription>2016 MY VEHICLE CUSTOM VAN 270S 2.2D 100PS</n0:LadingDescription>
            <n0:VehicleLine>TVL TF</n0:VehicleLine>
            <n0:VehicleBodyCode>TCA VA</n0:VehicleBodyCode>
          </ne:VINDetails>
          <n0:Measure>
            <n0:MeasureQualifier>FT</n0:MeasureQualifier>
            <n0:Length>16.31</n0:Length>
            <n0:Width>6.52</n0:Width>
            <n0:Height>6.5</n0:Height>
          </n0:Measure>
          <n0:Measure>
            <n0:MeasureQualifier>M</n0:MeasureQualifier>
            <n0:Length>4.97</n0:Length>
            <n0:Width>1.99</n0:Width>
            <n0:Height>1.98</n0:Height>
          </n0:Measure>
          <n0:Weight>
            <n0:WeightQualifier>G</n0:WeightQualifier>
            <n0:WeightUnitCode>L</n0:WeightUnitCode>
            <n0:Weight>4211.0</n0:Weight>
          </n0:Weight>
          <n0:Weight>
            <n0:WeightQualifier>G</n0:WeightQualifier>
            <n0:WeightUnitCode>K</n0:WeightUnitCode>
            <n0:Weight>1910.0</n0:Weight>
          </n0:Weight>
          <n0:Volume>
            <n0:VolumeUnitQualifier>E</n0:VolumeUnitQualifier>
            <n0:Volume>690.0</n0:Volume>
          </n0:Volume>
          <n0:Volume>
            <n0:VolumeUnitQualifier>X</n0:VolumeUnitQualifier>
            <n0:Volume>19.55</n0:Volume>
          </n0:Volume>
          <n0:PackagingFormCode>VEH</n0:PackagingFormCode>
          <n0:HTSNumber>8704.21.91.00</n0:HTSNumber>
        </n0:ShipmentItem>
        <ne:ShipmentFooter xmlns:ne="urn.client:mmm.ggg.glads.MessageInstruction">
          <n0:TotalQuantity>2</n0:TotalQuantity>
          <n0:TotalWeight>
            <n0:WeightQualifier>G</n0:WeightQualifier>
            <n0:WeightUnitCode>L</n0:WeightUnitCode>
            <n0:Weight>206339.0</n0:Weight>
          </n0:TotalWeight>
          <n0:TotalWeight>
            <n0:WeightQualifier>G</n0:WeightQualifier>
            <n0:WeightUnitCode>K</n0:WeightUnitCode>
            <n0:Weight>93590.0</n0:Weight>
          </n0:TotalWeight>
          <n0:TotalVolume>
            <n0:VolumeUnitQualifier>E</n0:VolumeUnitQualifier>
            <n0:Volume>33810.0</n0:Volume>
          </n0:TotalVolume>
          <n0:TotalVolume>
            <n0:VolumeUnitQualifier>X</n0:VolumeUnitQualifier>
            <n0:Volume>957.95</n0:Volume>
          </n0:TotalVolume>
        </ne:ShipmentFooter>
      </n0:ShippingInstructions>
    </nm:PIMessageInstruction>

    2. vb class

    Imports System.Xml.Serialization
    
    ' 
    ' This source code was auto-generated by xsd, Version=4.6.1055.0.
    ' 
    
    
    ''' <remarks/>
    <System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.6.1055.0")> _
    <System.SerializableAttribute> _
    <System.Diagnostics.DebuggerStepThroughAttribute> _
    <System.ComponentModel.DesignerCategoryAttribute("code")> _
    <System.Xml.Serialization.XmlTypeAttribute(AnonymousType:=True, [Namespace]:="urn.client:mmm.ggg.glads.MessageInstruction")> _
    <System.Xml.Serialization.XmlRootAttribute([Namespace]:="urn.client:mmm.ggg.glads.MessageInstruction", IsNullable:=False)> _
    Partial Public Class PIMessageInstruction
    
        Private headerField As PIMessageInstructionHeader
    
        Private shippingInstructionsField As PIMessageInstructionShippingInstructions
    
        ''' <remarks/>
        Public Property Header() As PIMessageInstructionHeader
            Get
                Return Me.headerField
            End Get
            Set
                Me.headerField = Value
            End Set
        End Property
    
        ''' <remarks/>
        Public Property ShippingInstructions() As PIMessageInstructionShippingInstructions
            Get
                Return Me.shippingInstructionsField
            End Get
            Set
                Me.shippingInstructionsField = Value
            End Set
        End Property
    End Class
    
    ''' <remarks/>
    <System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.6.1055.0")> _
    <System.SerializableAttribute> _
    <System.Diagnostics.DebuggerStepThroughAttribute> _
    <System.ComponentModel.DesignerCategoryAttribute("code")> _
    <System.Xml.Serialization.XmlTypeAttribute(AnonymousType:=True, [Namespace]:="urn.client:mmm.ggg.glads.MessageInstruction")> _
    Partial Public Class PIMessageInstructionHeader
    
        Private transactionTypeField As String
    
        Private senderIDField As String
    
        Private receiverIDField As String
    
        Private batchNumberField As Byte
    
        Private batchIndicatorField As String
    
        Private transactionDateField As System.DateTime
    
        Private transactionTimeField As System.DateTime
    
        Private environmentIdentifierField As String
    
        Private transactionCountField As Byte
    
        ''' <remarks/>
        Public Property TransactionType() As String
            Get
                Return Me.transactionTypeField
            End Get
            Set
                Me.transactionTypeField = Value
            End Set
        End Property
    
        ''' <remarks/>
        Public Property SenderID() As String
            Get
                Return Me.senderIDField
            End Get
            Set
                Me.senderIDField = Value
            End Set
        End Property
    
        ''' <remarks/>
        Public Property ReceiverID() As String
            Get
                Return Me.receiverIDField
            End Get
            Set
                Me.receiverIDField = Value
            End Set
        End Property
    
        ''' <remarks/>
        Public Property BatchNumber() As Byte
            Get
                Return Me.batchNumberField
            End Get
            Set
                Me.batchNumberField = Value
            End Set
        End Property
    
        ''' <remarks/>
        Public Property BatchIndicator() As String
            Get
                Return Me.batchIndicatorField
            End Get
            Set
                Me.batchIndicatorField = Value
            End Set
        End Property
    
        ''' <remarks/>
        <System.Xml.Serialization.XmlElementAttribute(DataType:="date")> _
        Public Property TransactionDate() As System.DateTime
            Get
                Return Me.transactionDateField
            End Get
            Set
                Me.transactionDateField = Value
            End Set
        End Property
    
        ''' <remarks/>
        <System.Xml.Serialization.XmlElementAttribute(DataType:="time")> _
        Public Property TransactionTime() As System.DateTime
            Get
                Return Me.transactionTimeField
            End Get
            Set
                Me.transactionTimeField = Value
            End Set
        End Property
    
        ''' <remarks/>
        Public Property EnvironmentIdentifier() As String
            Get
                Return Me.environmentIdentifierField
            End Get
            Set
                Me.environmentIdentifierField = Value
            End Set
        End Property
    
        ''' <remarks/>
        Public Property TransactionCount() As Byte
            Get
                Return Me.transactionCountField
            End Get
            Set
                Me.transactionCountField = Value
            End Set
        End Property
    End Class
    
    ''' <remarks/>
    <System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.6.1055.0")> _
    <System.SerializableAttribute> _
    <System.Diagnostics.DebuggerStepThroughAttribute> _
    <System.ComponentModel.DesignerCategoryAttribute("code")> _
    <System.Xml.Serialization.XmlTypeAttribute(AnonymousType:=True, [Namespace]:="urn.client:mmm.ggg.glads.MessageInstruction")> _
    Partial Public Class PIMessageInstructionShippingInstructions
    
        Private transactionReferenceIdField As UInteger
    
        Private shipmentHeaderField As PIMessageInstructionShippingInstructionsShipmentHeader
    
        Private shipmentItemField As PIMessageInstructionShippingInstructionsShipmentItem()
    
        Private shipmentFooterField As PIMessageInstructionShippingInstructionsShipmentFooter
    
        ''' <remarks/>
        Public Property TransactionReferenceId() As UInteger
            Get
                Return Me.transactionReferenceIdField
            End Get
            Set
                Me.transactionReferenceIdField = Value
            End Set
        End Property
    
        ''' <remarks/>
        Public Property ShipmentHeader() As PIMessageInstructionShippingInstructionsShipmentHeader
            Get
                Return Me.shipmentHeaderField
            End Get
            Set
                Me.shipmentHeaderField = Value
            End Set
        End Property
    
        ''' <remarks/>
        <System.Xml.Serialization.XmlElementAttribute("ShipmentItem")> _
        Public Property ShipmentItem() As PIMessageInstructionShippingInstructionsShipmentItem()
            Get
                Return Me.shipmentItemField
            End Get
            Set
                Me.shipmentItemField = Value
            End Set
        End Property
    
        ''' <remarks/>
        Public Property ShipmentFooter() As PIMessageInstructionShippingInstructionsShipmentFooter
            Get
                Return Me.shipmentFooterField
            End Get
            Set
                Me.shipmentFooterField = Value
            End Set
        End Property
    End Class
    
    ''' <remarks/>
    <System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.6.1055.0")> _
    <System.SerializableAttribute> _
    <System.Diagnostics.DebuggerStepThroughAttribute> _
    <System.ComponentModel.DesignerCategoryAttribute("code")> _
    <System.Xml.Serialization.XmlTypeAttribute(AnonymousType:=True, [Namespace]:="urn.client:mmm.ggg.glads.MessageInstruction")> _
    Partial Public Class PIMessageInstructionShippingInstructionsShipmentHeader
    
        Private actionCodeField As String
    
        Private shipmentField As PIMessageInstructionShippingInstructionsShipmentHeaderShipment
    
        Private vesselDetailField As PIMessageInstructionShippingInstructionsShipmentHeaderVesselDetail
    
        Private portDetailsField As PIMessageInstructionShippingInstructionsShipmentHeaderPortDetails
    
        Private contactPartyField As PIMessageInstructionShippingInstructionsShipmentHeaderContactParty()
    
        ''' <remarks/>
        Public Property ActionCode() As String
            Get
                Return Me.actionCodeField
            End Get
            Set
                Me.actionCodeField = Value
            End Set
        End Property
    
        ''' <remarks/>
        Public Property Shipment() As PIMessageInstructionShippingInstructionsShipmentHeaderShipment
            Get
                Return Me.shipmentField
            End Get
            Set
                Me.shipmentField = Value
            End Set
        End Property
    
        ''' <remarks/>
        Public Property VesselDetail() As PIMessageInstructionShippingInstructionsShipmentHeaderVesselDetail
            Get
                Return Me.vesselDetailField
            End Get
            Set
                Me.vesselDetailField = Value
            End Set
        End Property
    
        ''' <remarks/>
        Public Property PortDetails() As PIMessageInstructionShippingInstructionsShipmentHeaderPortDetails
            Get
                Return Me.portDetailsField
            End Get
            Set
                Me.portDetailsField = Value
            End Set
        End Property
    
        ''' <remarks/>
        <System.Xml.Serialization.XmlElementAttribute("ContactParty")> _
        Public Property ContactParty() As PIMessageInstructionShippingInstructionsShipmentHeaderContactParty()
            Get
                Return Me.contactPartyField
            End Get
            Set
                Me.contactPartyField = Value
            End Set
        End Property
    End Class
    
    ''' <remarks/>
    <System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.6.1055.0")> _
    <System.SerializableAttribute> _
    <System.Diagnostics.DebuggerStepThroughAttribute> _
    <System.ComponentModel.DesignerCategoryAttribute("code")> _
    <System.Xml.Serialization.XmlTypeAttribute(AnonymousType:=True, [Namespace]:="urn.client:mmm.ggg.glads.MessageInstruction")> _
    Partial Public Class PIMessageInstructionShippingInstructionsShipmentHeaderShipment
    
        Private shipmentIdentificationNumberField As ULong
    
        Private eDIdentificationNumberField As UInteger
    
        Private shipmentMethodofPaymentField As String
    
        Private shipmentTypeField As Byte
    
        Private billOfLadingTypeField As String
    
        ''' <remarks/>
        Public Property ShipmentIdentificationNumber() As ULong
            Get
                Return Me.shipmentIdentificationNumberField
            End Get
            Set
                Me.shipmentIdentificationNumberField = Value
            End Set
        End Property
    
        ''' <remarks/>
        Public Property EDIdentificationNumber() As UInteger
            Get
                Return Me.eDIdentificationNumberField
            End Get
            Set
                Me.eDIdentificationNumberField = Value
            End Set
        End Property
    
        ''' <remarks/>
        Public Property ShipmentMethodofPayment() As String
            Get
                Return Me.shipmentMethodofPaymentField
            End Get
            Set
                Me.shipmentMethodofPaymentField = Value
            End Set
        End Property
    
        ''' <remarks/>
        Public Property ShipmentType() As Byte
            Get
                Return Me.shipmentTypeField
            End Get
            Set
                Me.shipmentTypeField = Value
            End Set
        End Property
    
        ''' <remarks/>
        Public Property BillOfLadingType() As String
            Get
                Return Me.billOfLadingTypeField
            End Get
            Set
                Me.billOfLadingTypeField = Value
            End Set
        End Property
    End Class
    
    ''' <remarks/>
    <System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.6.1055.0")> _
    <System.SerializableAttribute> _
    <System.Diagnostics.DebuggerStepThroughAttribute> _
    <System.ComponentModel.DesignerCategoryAttribute("code")> _
    <System.Xml.Serialization.XmlTypeAttribute(AnonymousType:=True, [Namespace]:="urn.client:mmm.ggg.glads.MessageInstruction")> _
    Partial Public Class PIMessageInstructionShippingInstructionsShipmentHeaderVesselDetail
    
        Private vesselCodeField As UInteger
    
        Private voyageIDField As String
    
        ''' <remarks/>
        Public Property VesselCode() As UInteger
            Get
                Return Me.vesselCodeField
            End Get
            Set
                Me.vesselCodeField = Value
            End Set
        End Property
    
        ''' <remarks/>
        Public Property VoyageID() As String
            Get
                Return Me.voyageIDField
            End Get
            Set
                Me.voyageIDField = Value
            End Set
        End Property
    End Class
    
    ''' <remarks/>
    <System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.6.1055.0")> _
    <System.SerializableAttribute> _
    <System.Diagnostics.DebuggerStepThroughAttribute> _
    <System.ComponentModel.DesignerCategoryAttribute("code")> _
    <System.Xml.Serialization.XmlTypeAttribute(AnonymousType:=True, [Namespace]:="urn.client:mmm.ggg.glads.MessageInstruction")> _
    Partial Public Class PIMessageInstructionShippingInstructionsShipmentHeaderPortDetails
    
        Private pOLISOCodeField As String
    
        Private pOLNameField As String
    
        Private pODISOCodeField As String
    
        Private pODNameField As String
    
        Private bookingNumberField As String
    
        ''' <remarks/>
        Public Property POLISOCode() As String
            Get
                Return Me.pOLISOCodeField
            End Get
            Set
                Me.pOLISOCodeField = Value
            End Set
        End Property
    
        ''' <remarks/>
        Public Property POLName() As String
            Get
                Return Me.pOLNameField
            End Get
            Set
                Me.pOLNameField = Value
            End Set
        End Property
    
        ''' <remarks/>
        Public Property PODISOCode() As String
            Get
                Return Me.pODISOCodeField
            End Get
            Set
                Me.pODISOCodeField = Value
            End Set
        End Property
    
        ''' <remarks/>
        Public Property PODName() As String
            Get
                Return Me.pODNameField
            End Get
            Set
                Me.pODNameField = Value
            End Set
        End Property
    
        ''' <remarks/>
        Public Property BookingNumber() As String
            Get
                Return Me.bookingNumberField
            End Get
            Set
                Me.bookingNumberField = Value
            End Set
        End Property
    End Class
    
    ''' <remarks/>
    <System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.6.1055.0")> _
    <System.SerializableAttribute> _
    <System.Diagnostics.DebuggerStepThroughAttribute> _
    <System.ComponentModel.DesignerCategoryAttribute("code")> _
    <System.Xml.Serialization.XmlTypeAttribute(AnonymousType:=True, [Namespace]:="urn.client:mmm.ggg.glads.MessageInstruction")> _
    Partial Public Class PIMessageInstructionShippingInstructionsShipmentHeaderContactParty
    
        Private entityIdentifierCodeField As String
    
        Private name1Field As String
    
        Private address1Field As String
    
        Private address2Field As String
    
        Private contactField As PIMessageInstructionShippingInstructionsShipmentHeaderContactPartyContact()
    
        ''' <remarks/>
        Public Property EntityIdentifierCode() As String
            Get
                Return Me.entityIdentifierCodeField
            End Get
            Set
                Me.entityIdentifierCodeField = Value
            End Set
        End Property
    
        ''' <remarks/>
        Public Property Name1() As String
            Get
                Return Me.name1Field
            End Get
            Set
                Me.name1Field = Value
            End Set
        End Property
    
        ''' <remarks/>
        Public Property Address1() As String
            Get
                Return Me.address1Field
            End Get
            Set
                Me.address1Field = Value
            End Set
        End Property
    
        ''' <remarks/>
        Public Property Address2() As String
            Get
                Return Me.address2Field
            End Get
            Set
                Me.address2Field = Value
            End Set
        End Property
    
        ''' <remarks/>
        <System.Xml.Serialization.XmlElementAttribute("Contact")> _
        Public Property Contact() As PIMessageInstructionShippingInstructionsShipmentHeaderContactPartyContact()
            Get
                Return Me.contactField
            End Get
            Set
                Me.contactField = Value
            End Set
        End Property
    End Class
    
    ''' <remarks/>
    <System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.6.1055.0")> _
    <System.SerializableAttribute> _
    <System.Diagnostics.DebuggerStepThroughAttribute> _
    <System.ComponentModel.DesignerCategoryAttribute("code")> _
    <System.Xml.Serialization.XmlTypeAttribute(AnonymousType:=True, [Namespace]:="urn.client:mmm.ggg.glads.MessageInstruction")> _
    Partial Public Class PIMessageInstructionShippingInstructionsShipmentHeaderContactPartyContact
    
        Private contactFunctionCodeField As String
    
        Private contactNameField As String
    
        Private contactDetailField As String
    
        ''' <remarks/>
        Public Property ContactFunctionCode() As String
            Get
                Return Me.contactFunctionCodeField
            End Get
            Set
                Me.contactFunctionCodeField = Value
            End Set
        End Property
    
        ''' <remarks/>
        Public Property ContactName() As String
            Get
                Return Me.contactNameField
            End Get
            Set
                Me.contactNameField = Value
            End Set
        End Property
    
        ''' <remarks/>
        Public Property ContactDetail() As String
            Get
                Return Me.contactDetailField
            End Get
            Set
                Me.contactDetailField = Value
            End Set
        End Property
    End Class
    
    ''' <remarks/>
    <System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.6.1055.0")> _
    <System.SerializableAttribute> _
    <System.Diagnostics.DebuggerStepThroughAttribute> _
    <System.ComponentModel.DesignerCategoryAttribute("code")> _
    <System.Xml.Serialization.XmlTypeAttribute(AnonymousType:=True, [Namespace]:="urn.client:mmm.ggg.glads.MessageInstruction")> _
    Partial Public Class PIMessageInstructionShippingInstructionsShipmentItem
    
        Private actionCodeField As String
    
        Private vINDetailsField As PIMessageInstructionShippingInstructionsShipmentItemVINDetails
    
        Private measureField As PIMessageInstructionShippingInstructionsShipmentItemMeasure()
    
        Private weightField As PIMessageInstructionShippingInstructionsShipmentItemWeight()
    
        Private volumeField As PIMessageInstructionShippingInstructionsShipmentItemVolume()
    
        Private packagingFormCodeField As String
    
        Private hTSNumberField As String
    
        ''' <remarks/>
        Public Property ActionCode() As String
            Get
                Return Me.actionCodeField
            End Get
            Set
                Me.actionCodeField = Value
            End Set
        End Property
    
        ''' <remarks/>
        Public Property VINDetails() As PIMessageInstructionShippingInstructionsShipmentItemVINDetails
            Get
                Return Me.vINDetailsField
            End Get
            Set
                Me.vINDetailsField = Value
            End Set
        End Property
    
        ''' <remarks/>
        <System.Xml.Serialization.XmlElementAttribute("Measure")> _
        Public Property Measure() As PIMessageInstructionShippingInstructionsShipmentItemMeasure()
            Get
                Return Me.measureField
            End Get
            Set
                Me.measureField = Value
            End Set
        End Property
    
        ''' <remarks/>
        <System.Xml.Serialization.XmlElementAttribute("Weight")> _
        Public Property Weight() As PIMessageInstructionShippingInstructionsShipmentItemWeight()
            Get
                Return Me.weightField
            End Get
            Set
                Me.weightField = Value
            End Set
        End Property
    
        ''' <remarks/>
        <System.Xml.Serialization.XmlElementAttribute("Volume")> _
        Public Property Volume() As PIMessageInstructionShippingInstructionsShipmentItemVolume()
            Get
                Return Me.volumeField
            End Get
            Set
                Me.volumeField = Value
            End Set
        End Property
    
        ''' <remarks/>
        Public Property PackagingFormCode() As String
            Get
                Return Me.packagingFormCodeField
            End Get
            Set
                Me.packagingFormCodeField = Value
            End Set
        End Property
    
        ''' <remarks/>
        Public Property HTSNumber() As String
            Get
                Return Me.hTSNumberField
            End Get
            Set
                Me.hTSNumberField = Value
            End Set
        End Property
    End Class
    
    ''' <remarks/>
    <System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.6.1055.0")> _
    <System.SerializableAttribute> _
    <System.Diagnostics.DebuggerStepThroughAttribute> _
    <System.ComponentModel.DesignerCategoryAttribute("code")> _
    <System.Xml.Serialization.XmlTypeAttribute(AnonymousType:=True, [Namespace]:="urn.client:mmm.ggg.glads.MessageInstruction")> _
    Partial Public Class PIMessageInstructionShippingInstructionsShipmentItemVINDetails
    
        Private vINNumberField As String
    
        Private ladingDescriptionField As String
    
        Private vehicleLineField As String
    
        Private vehicleBodyCodeField As String
    
        ''' <remarks/>
        Public Property VINNumber() As String
            Get
                Return Me.vINNumberField
            End Get
            Set
                Me.vINNumberField = Value
            End Set
        End Property
    
        ''' <remarks/>
        Public Property LadingDescription() As String
            Get
                Return Me.ladingDescriptionField
            End Get
            Set
                Me.ladingDescriptionField = Value
            End Set
        End Property
    
        ''' <remarks/>
        Public Property VehicleLine() As String
            Get
                Return Me.vehicleLineField
            End Get
            Set
                Me.vehicleLineField = Value
            End Set
        End Property
    
        ''' <remarks/>
        Public Property VehicleBodyCode() As String
            Get
                Return Me.vehicleBodyCodeField
            End Get
            Set
                Me.vehicleBodyCodeField = Value
            End Set
        End Property
    End Class
    
    ''' <remarks/>
    <System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.6.1055.0")> _
    <System.SerializableAttribute> _
    <System.Diagnostics.DebuggerStepThroughAttribute> _
    <System.ComponentModel.DesignerCategoryAttribute("code")> _
    <System.Xml.Serialization.XmlTypeAttribute(AnonymousType:=True, [Namespace]:="urn.client:mmm.ggg.glads.MessageInstruction")> _
    Partial Public Class PIMessageInstructionShippingInstructionsShipmentItemMeasure
    
        Private measureQualifierField As String
    
        Private lengthField As Decimal
    
        Private widthField As Decimal
    
        Private heightField As Decimal
    
        ''' <remarks/>
        Public Property MeasureQualifier() As String
            Get
                Return Me.measureQualifierField
            End Get
            Set
                Me.measureQualifierField = Value
            End Set
        End Property
    
        ''' <remarks/>
        Public Property Length() As Decimal
            Get
                Return Me.lengthField
            End Get
            Set
                Me.lengthField = Value
            End Set
        End Property
    
        ''' <remarks/>
        Public Property Width() As Decimal
            Get
                Return Me.widthField
            End Get
            Set
                Me.widthField = Value
            End Set
        End Property
    
        ''' <remarks/>
        Public Property Height() As Decimal
            Get
                Return Me.heightField
            End Get
            Set
                Me.heightField = Value
            End Set
        End Property
    End Class
    
    ''' <remarks/>
    <System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.6.1055.0")> _
    <System.SerializableAttribute> _
    <System.Diagnostics.DebuggerStepThroughAttribute> _
    <System.ComponentModel.DesignerCategoryAttribute("code")> _
    <System.Xml.Serialization.XmlTypeAttribute(AnonymousType:=True, [Namespace]:="urn.client:mmm.ggg.glads.MessageInstruction")> _
    Partial Public Class PIMessageInstructionShippingInstructionsShipmentItemWeight
    
        Private weightQualifierField As String
    
        Private weightUnitCodeField As String
    
        Private weightField As Decimal
    
        ''' <remarks/>
        Public Property WeightQualifier() As String
            Get
                Return Me.weightQualifierField
            End Get
            Set
                Me.weightQualifierField = Value
            End Set
        End Property
    
        ''' <remarks/>
        Public Property WeightUnitCode() As String
            Get
                Return Me.weightUnitCodeField
            End Get
            Set
                Me.weightUnitCodeField = Value
            End Set
        End Property
    
        ''' <remarks/>
        Public Property Weight() As Decimal
            Get
                Return Me.weightField
            End Get
            Set
                Me.weightField = Value
            End Set
        End Property
    End Class
    
    ''' <remarks/>
    <System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.6.1055.0")> _
    <System.SerializableAttribute> _
    <System.Diagnostics.DebuggerStepThroughAttribute> _
    <System.ComponentModel.DesignerCategoryAttribute("code")> _
    <System.Xml.Serialization.XmlTypeAttribute(AnonymousType:=True, [Namespace]:="urn.client:mmm.ggg.glads.MessageInstruction")> _
    Partial Public Class PIMessageInstructionShippingInstructionsShipmentItemVolume
    
        Private volumeUnitQualifierField As String
    
        Private volumeField As Decimal
    
        ''' <remarks/>
        Public Property VolumeUnitQualifier() As String
            Get
                Return Me.volumeUnitQualifierField
            End Get
            Set
                Me.volumeUnitQualifierField = Value
            End Set
        End Property
    
        ''' <remarks/>
        Public Property Volume() As Decimal
            Get
                Return Me.volumeField
            End Get
            Set
                Me.volumeField = Value
            End Set
        End Property
    End Class
    
    ''' <remarks/>
    <System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.6.1055.0")> _
    <System.SerializableAttribute> _
    <System.Diagnostics.DebuggerStepThroughAttribute> _
    <System.ComponentModel.DesignerCategoryAttribute("code")> _
    <System.Xml.Serialization.XmlTypeAttribute(AnonymousType:=True, [Namespace]:="urn.client:mmm.ggg.glads.MessageInstruction")> _
    Partial Public Class PIMessageInstructionShippingInstructionsShipmentFooter
    
        Private totalQuantityField As Byte
    
        Private totalWeightField As PIMessageInstructionShippingInstructionsShipmentFooterTotalWeight()
    
        Private totalVolumeField As PIMessageInstructionShippingInstructionsShipmentFooterTotalVolume()
    
        ''' <remarks/>
        Public Property TotalQuantity() As Byte
            Get
                Return Me.totalQuantityField
            End Get
            Set
                Me.totalQuantityField = Value
            End Set
        End Property
    
        ''' <remarks/>
        <System.Xml.Serialization.XmlElementAttribute("TotalWeight")> _
        Public Property TotalWeight() As PIMessageInstructionShippingInstructionsShipmentFooterTotalWeight()
            Get
                Return Me.totalWeightField
            End Get
            Set
                Me.totalWeightField = Value
            End Set
        End Property
    
        ''' <remarks/>
        <System.Xml.Serialization.XmlElementAttribute("TotalVolume")> _
        Public Property TotalVolume() As PIMessageInstructionShippingInstructionsShipmentFooterTotalVolume()
            Get
                Return Me.totalVolumeField
            End Get
            Set
                Me.totalVolumeField = Value
            End Set
        End Property
    End Class
    
    ''' <remarks/>
    <System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.6.1055.0")> _
    <System.SerializableAttribute> _
    <System.Diagnostics.DebuggerStepThroughAttribute> _
    <System.ComponentModel.DesignerCategoryAttribute("code")> _
    <System.Xml.Serialization.XmlTypeAttribute(AnonymousType:=True, [Namespace]:="urn.client:mmm.ggg.glads.MessageInstruction")> _
    Partial Public Class PIMessageInstructionShippingInstructionsShipmentFooterTotalWeight
    
        Private weightQualifierField As String
    
        Private weightUnitCodeField As String
    
        Private weightField As Decimal
    
        ''' <remarks/>
        Public Property WeightQualifier() As String
            Get
                Return Me.weightQualifierField
            End Get
            Set
                Me.weightQualifierField = Value
            End Set
        End Property
    
        ''' <remarks/>
        Public Property WeightUnitCode() As String
            Get
                Return Me.weightUnitCodeField
            End Get
            Set
                Me.weightUnitCodeField = Value
            End Set
        End Property
    
        ''' <remarks/>
        Public Property Weight() As Decimal
            Get
                Return Me.weightField
            End Get
            Set
                Me.weightField = Value
            End Set
        End Property
    End Class
    
    ''' <remarks/>
    <System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.6.1055.0")> _
    <System.SerializableAttribute> _
    <System.Diagnostics.DebuggerStepThroughAttribute> _
    <System.ComponentModel.DesignerCategoryAttribute("code")> _
    <System.Xml.Serialization.XmlTypeAttribute(AnonymousType:=True, [Namespace]:="urn.client:mmm.ggg.glads.MessageInstruction")> _
    Partial Public Class PIMessageInstructionShippingInstructionsShipmentFooterTotalVolume
    
        Private volumeUnitQualifierField As String
    
        Private volumeField As Decimal
    
        ''' <remarks/>
        Public Property VolumeUnitQualifier() As String
            Get
                Return Me.volumeUnitQualifierField
            End Get
            Set
                Me.volumeUnitQualifierField = Value
            End Set
        End Property
    
        ''' <remarks/>
        Public Property Volume() As Decimal
            Get
                Return Me.volumeField
            End Get
            Set
                Me.volumeField = Value
            End Set
        End Property
    End Class
    

    3. The sample Web Sevice

    Imports System.Web.Services
    Imports System.Web.Services.Protocols
    Imports System.ComponentModel
    
    ' To allow this Web Service to be called from script, using ASP.NET AJAX, uncomment the following line.
    ' <System.Web.Script.Services.ScriptService()> _
    <System.Web.Services.WebService(Namespace:="http://tempuri.org/")> _
    <System.Web.Services.WebServiceBinding(ConformsTo:=WsiProfiles.BasicProfile1_1)> _
    <ToolboxItem(False)> _
    Public Class WebService1
        Inherits System.Web.Services.WebService
    
        <WebMethod()> _
        Public Function HelloWorld(ByVal in_ship As PIMessageInstruction) As String
            Return "Hello World"
        End Function
    
    End Class

    Best Regards,

    Monday, August 14, 2017 2:54 PM
  • User1168443798 posted

    Hi mm_dev,

    >> Possible SOAP version mismatch: Envelope namespace client.Namespace was unexpected. Expecting http://schemas.xmlsoap.org/soap/envelope/.

    For above error, I think you could try SoapExtension to modify the message request.

    But, per to your last reply, I am afraid your service still will not work. Your sample xml and web service are not the same. Your web service is just a simple service, and your request xml needs a complex object input.

    To check whether it will work after modifying Envelope namespace, you could send the request in Fiddler and change urn.client:mmm.ggg.glads.MessageInstruction to http://schemas.xmlsoap.org/soap/envelope/. Will the request succeed in Fiddler?

    For your requirement, I think you need to confirm with SAP to check how they developed such service.

    Best Regards,

    Edward

    Tuesday, August 15, 2017 7:14 AM