amit8207
15 years agoNew Contributor
testing wcf service which expects message of type Any
hi,
i have one wcf service which accepts message of type "Any". and i want to test this service using SoapUI. i have created test and created the request message but it is not getting validated. getting error message "line -1: Missing message part with name:type [part:{http://www.w3.org/2001/XMLSchema}anyType]".
also when i send this message to service i am getting error message saying
a:BadContextToken
The message could not be processed. This is most likely because the action 'http://Microsoft.BizTalk.ESB/ProcessRequest/SubmitRequestRequest' is incorrect or because the message contains an invalid or expired security context token or because there is a mismatch between bindings. The security context token would be invalid if the service aborted the channel due to inactivity. To prevent the service from aborting idle sessions prematurely increase the Receive timeout on the service endpoint's binding
here is my request message
<soap:Envelope xmlns:a="http://www.w3.org/2005/08/addressing" xmlns:soap="http://www.w3.org/2003/05/soap-envelope">
<soap:Header>
<a:Action soap:mustUnderstand="1">SubmitRequestResponseRequest</a:Action>
</soap:Header>
<soap:Body>
<part i:type="d2p1:string" xmlns:d2p1="http://www.w3.org/2001/XMLSchema" xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/ESB.Itinerary.Test.ItineraryGenericOneWayService">
<ns0:CustomerEvent xmlns:ns0="http://schemas.imservices.org.uk/test/customerevent/1.0">
<Action>Create</Action>
<Customer>
<ID>ID_0</ID>
<Name>Name_0</Name>
<CompanyName>CompanyName_0</CompanyName>
<DeliveryAddress>
<ns1:BS7666Address xmlns:ns1="http://www.govtalk.gov.uk/people/AddressAndPersonalDetails">
<ns2:SAON xmlns:ns2="http://www.govtalk.gov.uk/people/bs7666">9999A</ns2:SAON>
<ns2:PAON xmlns:ns2="http://www.govtalk.gov.uk/people/bs7666">9999A</ns2:PAON>
<ns2:StreetDescription xmlns:ns2="http://www.govtalk.gov.uk/people/bs7666">StreetDescriptionStreetDescriptionStreetDescriptio</ns2:StreetDescription>
<ns2:UniqueStreetReferenceNumber xmlns:ns2="http://www.govtalk.gov.uk/people/bs7666">50000000</ns2:UniqueStreetReferenceNumber>
<ns2:Locality xmlns:ns2="http://www.govtalk.gov.uk/people/bs7666">LocalityLocalityLo</ns2:Locality>
<ns2:Town xmlns:ns2="http://www.govtalk.gov.uk/people/bs7666">TownTownTownTow</ns2:Town>
<ns2:AdministrativeArea xmlns:ns2="http://www.govtalk.gov.uk/people/bs7666">AdministrativeA</ns2:AdministrativeArea>
<ns2:PostTown xmlns:ns2="http://www.govtalk.gov.uk/people/bs7666">PostTownPostTow</ns2:PostTown>
<ns2:PostCode xmlns:ns2="http://www.govtalk.gov.uk/people/bs7666">B15 2DX</ns2:PostCode>
<ns2:UniquePropertyReferenceNumber xmlns:ns2="http://www.govtalk.gov.uk/people/bs7666">123456789012</ns2:UniquePropertyReferenceNumber>
</ns1:BS7666Address>
<ns1:UniquePropertyReferenceNumber xmlns:ns1="http://www.govtalk.gov.uk/people/AddressAndPersonalDetails">123456789012</ns1:UniquePropertyReferenceNumber>
<ns1:SortCode xmlns:ns1="http://www.govtalk.gov.uk/people/AddressAndPersonalDetails">12345</ns1:SortCode>
</DeliveryAddress>
<BillingAddress>
<ns1:BS7666Address xmlns:ns1="http://www.govtalk.gov.uk/people/AddressAndPersonalDetails">
<ns2:SAON xmlns:ns2="http://www.govtalk.gov.uk/people/bs7666">9999A</ns2:SAON>
<ns2:PAON xmlns:ns2="http://www.govtalk.gov.uk/people/bs7666">9999A</ns2:PAON>
<ns2:StreetDescription xmlns:ns2="http://www.govtalk.gov.uk/people/bs7666">StreetDescriptionStreetDescriptionStreetDescriptio</ns2:StreetDescription>
<ns2:UniqueStreetReferenceNumber xmlns:ns2="http://www.govtalk.gov.uk/people/bs7666">50000000</ns2:UniqueStreetReferenceNumber>
<ns2:Locality xmlns:ns2="http://www.govtalk.gov.uk/people/bs7666">LocalityLocalityLo</ns2:Locality>
<ns2:Town xmlns:ns2="http://www.govtalk.gov.uk/people/bs7666">TownTownTownTow</ns2:Town>
<ns2:AdministrativeArea xmlns:ns2="http://www.govtalk.gov.uk/people/bs7666">AdministrativeA</ns2:AdministrativeArea>
<ns2:PostTown xmlns:ns2="http://www.govtalk.gov.uk/people/bs7666">PostTownPostTow</ns2:PostTown>
<ns2:PostCode xmlns:ns2="http://www.govtalk.gov.uk/people/bs7666">B15 2DX</ns2:PostCode>
<ns2:UniquePropertyReferenceNumber xmlns:ns2="http://www.govtalk.gov.uk/people/bs7666">123456789012</ns2:UniquePropertyReferenceNumber>
</ns1:BS7666Address>
<ns1:UniquePropertyReferenceNumber xmlns:ns1="http://www.govtalk.gov.uk/people/AddressAndPersonalDetails">123456789012</ns1:UniquePropertyReferenceNumber>
<ns1:SortCode xmlns:ns1="http://www.govtalk.gov.uk/people/AddressAndPersonalDetails">12345</ns1:SortCode>
</BillingAddress>
</Customer>
</ns0:CustomerEvent>
</part>
</soap:Body>
</soap:Envelope>
can you please help me to solve this, i am trying but it is not working.
thanks in advance.
regards,
Amit
i have one wcf service which accepts message of type "Any". and i want to test this service using SoapUI. i have created test and created the request message but it is not getting validated. getting error message "line -1: Missing message part with name:type [part:{http://www.w3.org/2001/XMLSchema}anyType]".
also when i send this message to service i am getting error message saying
a:BadContextToken
The message could not be processed. This is most likely because the action 'http://Microsoft.BizTalk.ESB/ProcessRequest/SubmitRequestRequest' is incorrect or because the message contains an invalid or expired security context token or because there is a mismatch between bindings. The security context token would be invalid if the service aborted the channel due to inactivity. To prevent the service from aborting idle sessions prematurely increase the Receive timeout on the service endpoint's binding
here is my request message
<soap:Envelope xmlns:a="http://www.w3.org/2005/08/addressing" xmlns:soap="http://www.w3.org/2003/05/soap-envelope">
<soap:Header>
<a:Action soap:mustUnderstand="1">SubmitRequestResponseRequest</a:Action>
</soap:Header>
<soap:Body>
<part i:type="d2p1:string" xmlns:d2p1="http://www.w3.org/2001/XMLSchema" xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/ESB.Itinerary.Test.ItineraryGenericOneWayService">
<ns0:CustomerEvent xmlns:ns0="http://schemas.imservices.org.uk/test/customerevent/1.0">
<Action>Create</Action>
<Customer>
<ID>ID_0</ID>
<Name>Name_0</Name>
<CompanyName>CompanyName_0</CompanyName>
<DeliveryAddress>
<ns1:BS7666Address xmlns:ns1="http://www.govtalk.gov.uk/people/AddressAndPersonalDetails">
<ns2:SAON xmlns:ns2="http://www.govtalk.gov.uk/people/bs7666">9999A</ns2:SAON>
<ns2:PAON xmlns:ns2="http://www.govtalk.gov.uk/people/bs7666">9999A</ns2:PAON>
<ns2:StreetDescription xmlns:ns2="http://www.govtalk.gov.uk/people/bs7666">StreetDescriptionStreetDescriptionStreetDescriptio</ns2:StreetDescription>
<ns2:UniqueStreetReferenceNumber xmlns:ns2="http://www.govtalk.gov.uk/people/bs7666">50000000</ns2:UniqueStreetReferenceNumber>
<ns2:Locality xmlns:ns2="http://www.govtalk.gov.uk/people/bs7666">LocalityLocalityLo</ns2:Locality>
<ns2:Town xmlns:ns2="http://www.govtalk.gov.uk/people/bs7666">TownTownTownTow</ns2:Town>
<ns2:AdministrativeArea xmlns:ns2="http://www.govtalk.gov.uk/people/bs7666">AdministrativeA</ns2:AdministrativeArea>
<ns2:PostTown xmlns:ns2="http://www.govtalk.gov.uk/people/bs7666">PostTownPostTow</ns2:PostTown>
<ns2:PostCode xmlns:ns2="http://www.govtalk.gov.uk/people/bs7666">B15 2DX</ns2:PostCode>
<ns2:UniquePropertyReferenceNumber xmlns:ns2="http://www.govtalk.gov.uk/people/bs7666">123456789012</ns2:UniquePropertyReferenceNumber>
</ns1:BS7666Address>
<ns1:UniquePropertyReferenceNumber xmlns:ns1="http://www.govtalk.gov.uk/people/AddressAndPersonalDetails">123456789012</ns1:UniquePropertyReferenceNumber>
<ns1:SortCode xmlns:ns1="http://www.govtalk.gov.uk/people/AddressAndPersonalDetails">12345</ns1:SortCode>
</DeliveryAddress>
<BillingAddress>
<ns1:BS7666Address xmlns:ns1="http://www.govtalk.gov.uk/people/AddressAndPersonalDetails">
<ns2:SAON xmlns:ns2="http://www.govtalk.gov.uk/people/bs7666">9999A</ns2:SAON>
<ns2:PAON xmlns:ns2="http://www.govtalk.gov.uk/people/bs7666">9999A</ns2:PAON>
<ns2:StreetDescription xmlns:ns2="http://www.govtalk.gov.uk/people/bs7666">StreetDescriptionStreetDescriptionStreetDescriptio</ns2:StreetDescription>
<ns2:UniqueStreetReferenceNumber xmlns:ns2="http://www.govtalk.gov.uk/people/bs7666">50000000</ns2:UniqueStreetReferenceNumber>
<ns2:Locality xmlns:ns2="http://www.govtalk.gov.uk/people/bs7666">LocalityLocalityLo</ns2:Locality>
<ns2:Town xmlns:ns2="http://www.govtalk.gov.uk/people/bs7666">TownTownTownTow</ns2:Town>
<ns2:AdministrativeArea xmlns:ns2="http://www.govtalk.gov.uk/people/bs7666">AdministrativeA</ns2:AdministrativeArea>
<ns2:PostTown xmlns:ns2="http://www.govtalk.gov.uk/people/bs7666">PostTownPostTow</ns2:PostTown>
<ns2:PostCode xmlns:ns2="http://www.govtalk.gov.uk/people/bs7666">B15 2DX</ns2:PostCode>
<ns2:UniquePropertyReferenceNumber xmlns:ns2="http://www.govtalk.gov.uk/people/bs7666">123456789012</ns2:UniquePropertyReferenceNumber>
</ns1:BS7666Address>
<ns1:UniquePropertyReferenceNumber xmlns:ns1="http://www.govtalk.gov.uk/people/AddressAndPersonalDetails">123456789012</ns1:UniquePropertyReferenceNumber>
<ns1:SortCode xmlns:ns1="http://www.govtalk.gov.uk/people/AddressAndPersonalDetails">12345</ns1:SortCode>
</BillingAddress>
</Customer>
</ns0:CustomerEvent>
</part>
</soap:Body>
</soap:Envelope>
can you please help me to solve this, i am trying but it is not working.
thanks in advance.
regards,
Amit