Message part request was not recognized - web-services

I have developed a Webservice . It was working fine with SOAP UI
When the client tested it through APIGEE , it started giving
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<soap:Fault>
<faultcode>soap:Client</faultcode>
<faultstring>Message part request was not recognized. (Does it exist in service WSDL?)</faultstring>
</soap:Fault>
</soap:Body>
</soap:Envelope>
Could anybody please tell me what might cause this ??

I am not sure, I got to this page googling for facing the same issue, the only answer I have found is here: http://prystash.blogspot.co.uk/2010/06/wsdls-and-message-parts-not-recognized.html, quoting:
The element declaration contained a reference to a complexType
instead of having the complexType defined within, or as part of, the
element declaration.

Related

Web service - SOAPui - Receiver Failed to serialize node AXIS2

Hy Guys,
I have a Web service problem. The used environment: SOAP - TOMCAT+AXIS2 - Gigaspace - Magic XPA 3.3
I have made 2 closely same external xpa program what gives back a blob in the Task's property sheet's Return value. It's "answer" back an XML, the simle different is that the first one make (XPA merge) a smaller (18KB) file (from a Filtered DB source), the bigger is write out the whole record aggregation. (1025KB)
When the soap UI receives the first one, everything is fine, i got the result XML on SOAP side. The bigger one shows this error:
With11Endpoint:
<soapenv:Fault>
<faultcode>soapenv:**Server**</faultcode>
<faultstring>**Failed to serialize node**</faultstring>
With12Endpoint:
<soapenv:Fault>
<soapenv:Code>
<soapenv:Value>soapenv:**Receiver**</soapenv:Value>
</soapenv:Code>
<soapenv:Reason>
<soapenv:Text xml:lang="en-US">**Failed to serialize node**</soapenv:Text>
</soapenv:Reason>
The only different is the size of files i think so. I have read some option to solve it like BasicHttpBinding's MaxReivedMessageSize and MaxBuffer size, but i could not find them to change values.
Does anyone have experience in this solutions?
Best Regards,
Gábor
For the future. The XML what has sent contained wrong values. Not tipical XML invalid character, instead an character. So i you have a SOAP error like that, try to Validate your XML file to search an option to solve your problem. ;)

Exchange Web Services - cannot get additional properties when calling "FindPeople" method

I'm making raw SOAP requests to Office365 and trying to get a list of contacts for specified AddressListId I successfully get a list of contacts, but it does not include all additional information I need. Once I add some additional properties (e.g. PhoneNumber) to my request, the server returns Invalid shape error.
Here is my request:
<?xml version="1.0" encoding="UTF-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types"
xmlns:m="http://schemas.microsoft.com/exchange/services/2006/messages">
<soap:Header>
<t:RequestServerVersion Version="Exchange2013" />
</soap:Header>
<soap:Body >
<m:FindPeople>
<m:PersonaShape>
<t:BaseShape>IdOnly</t:BaseShape>
<t:AdditionalProperties>
<t:FieldURI FieldURI="persona:DisplayName"/>
<t:FieldURI FieldURI="persona:PhoneNumber"/>
</t:AdditionalProperties>
</m:PersonaShape>
<m:IndexedPageItemView BasePoint="Beginning" MaxEntriesReturned="100" Offset="0"/>
<m:ParentFolderId>
<t:AddressListId Id="###-####-####-####"/>
</m:ParentFolderId>
</m:FindPeople>
</soap:Body>
</soap:Envelope>
How can I get all additional information for each persona?
I am using EWS Managed API, so you will have to search for the raw SOAP calls on MSDN, I can only direct your search a bit:
I had a similar problem, because the very same is applicable for FindAppointments(). Asking for AppointmentSchema.RequiredAttendees will raise the Invalid Shape error, and AppointmentSchema.Organizer won't contain the email address, only the name of the organizer, after using FindAppointments().
The solution was to do TWO requests to Exchange Server.
var appointments = calendarFolder.FindAppointments(BasePropertySet.FirstClassProperties);
exchangeService.LoadPropertiesForItems(appointments, MyAdvancedProperties);
I think that the same "workaround" is possible with FindPeople(), as well as every other Find%Itemtype%() EWS may support, I am not sure, though.
EDIT: I just found http://social.technet.microsoft.com/Forums/exchange/en-US/e83abfb1-37a8-48fe-9579-4e120fb77746/ews-managed-api-loadpropertiesforitems-returns-unexpected-end-of-xml-document?forum=exchangesvrdevelopment where it is stated that LoadPropertiesForItems does a call to raw soap GetItem with multiple ItemIDs.

Parsing and Recursion of SOAP response in SoapUI

I have a SOAP response from a TestStep in SoapUI. I want to parse each value of a specific element in the response and send it as a parameter to a separate request call to another web service.
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soapenv:Body>
<searchResponse xmlns="urn:messages_2012_2.platform.webservices.technoplat.com">
<platformCore:searchResult xmlns:platformCore="urn:core_2012_2.platform.webservices.technoplat.com">
<platformCore:searchRowList>
<platformCore:searchRow xsi:type="tranSales:TransactionSearchRow" xmlns:tranSales="urn:sales_2012_2.transactions.webservices.technoplat.com">
<tranSales:basic xmlns:platformCommon="urn:common_2012_2.platform.webservices.technoplat.com">
<platformCommon:tranId>
<platformCore:searchValue>17678</platformCore:searchValue>
</platformCommon:tranId>
</tranSales:basic>
</platformCore:searchRow>
<platformCore:searchRow xsi:type="tranSales:TransactionSearchRow" xmlns:tranSales="urn:sales_2012_2.transactions.webservices.technoplat.com">
<tranSales:basic xmlns:platformCommon="urn:common_2012_2.platform.webservices.technoplat.com">
<platformCommon:tranId>
<platformCore:searchValue>17705</platformCore:searchValue>
</platformCommon:tranId>
</tranSales:basic>
</platformCore:searchRow>
<platformCore:searchRow xsi:type="tranSales:TransactionSearchRow" xmlns:tranSales="urn:sales_2012_2.transactions.webservices.technoplat.com">
<tranSales:basic xmlns:platformCommon="urn:common_2012_2.platform.webservices.technoplat.com">
<platformCommon:tranId>
<platformCore:searchValue>17777</platformCore:searchValue>
</platformCommon:tranId>
</tranSales:basic>
</platformCore:searchRow>
</platformCore:searchRowList>
</platformCore:searchResult>
</searchResponse>
</soapenv:Body>
In the SOAP response above, I want to capture the values: 17678, 17705 and 17777 separately and send them as a parameter to another SOAP Request TestStep. Most people recommend using a groovy script for the recursion.
My questions are:
1. whats the best way to perform extraction of values from the SOAP response above and iterate and make a separate SOAPRequest TestStep in SoapUI?
2. Assuming each value is extracted in a Groovy TestStep, how can I feed those out to a "results.txt" kind of csv (name value pair) file outside.
Any suggestions would be appreciated.
This is the way I used before may be not the best.
parsing XML by XmlSluper.
There are many ways to process XML (see: http://groovy.codehaus.org/Processing+XML)
use XmlParser and CSVWriter (opencsv) to convert XML to CSV
I'd seen good example from here: http://blog.ktronline.com/2011/12/creating-csv-file-from-xml-using-groovy.html
if you're using soapUI Pro the easiest way to do this is use the DataSource TestStep with a XML DataSource (see http://blog.smartbear.com/software-quality/bid/170520/How-to-Use-XML-DataSources-for-Response-Processing-in-soapUI for an example). If you're using the free version then scripting is your best option!
Good Luck!
/Ole

How to get first element name of the SOAP Body using XSLT?

<soap:envelope>
<soap:body>
<ns:Hello>11</ns:Hello>
<ns1:hai>12</ns1:hai>
</soap:body>
</soap:envelope>
from above i need to get first element name from the body root tag i.e, need to get output as a 'Hello'. Please help me, thanks in advance.
Use:
local-name(/*/*/*[1])
It is recommended to avoid using the // XPath pseudo-operator whenever the structure of the XML document is statically known, because many XPath engines evaluate it inefficiently (by traversing a complete (sub)tree).
<xsl:value-of select="local-name(//soap:body/*[1])" />

This XML file does not appear to have any style information associated with it

I have deployed my webservice into Tomcat.
The WSDL has got some operations like ViewOptions, but when I ran that, I got this error:
This XML file does not appear to have any style information associated with it. The document tree is shown below.
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<soap:Fault>
<faultcode>soap:Server</faultcode>
<faultstring>1</faultstring>
</soap:Fault>
</soap:Body>
</soap:Envelope>
Why do we get this error?
The message isn't an "error" but rather a warning n need not be solved but ignored. An XML document is a data structure but does not contain any presentation/style information internally. Normally an XML document is used in inter-application communication or as a pure data structure that is then used with additional presentation/style information to display to users.
XML can be applied style by XSLT just as HTML by CSS and the above warning can be eradicated An eg: of applying xls to xml
We don't present xml using xls for RSS, Web Services as they are just used for communication without applying stylesheet rather than meant to be presented to user in browser.
So, everything is fine here.
what worked for my case. I replaced all the links of ... with window.open("...link", "_self") and changed
import {
HashRouter as Router,
} from 'react-router-dom';