Contributions
Re: Header part generated also in body in sample request
I've found the reason. Everything is Ok in the SoapUI code. It was my fault. In the operation binding input, I specified the attribute "part", whereas it should read as "parts" (plural).10 years agoPlace ReadyAPI QuestionsReadyAPI Questions1.3KViews0likes0CommentsRe: Header part generated also in body in sample request
I downloaded the source code of SoapUI and tried to locate the code for sample request generation. It starts in the class [tt:bx96k04y]com.eviware.soapui.impl.wsdl.actions.operation.NewRequestAction[/tt:bx96k04y]. The generation further descends to the class [tt:bx96k04y]com.eviware.soapui.impl.wsdl.support.wsdl.WsdlUtils[/tt:bx96k04y], method [tt:bx96k04y]getInputParts(BindingOperation operation)[/tt:bx96k04y]. This method should return parts that should be generated in the body of the sample SOAP request. The method returns all parts specified for the message if neither SOAP 1.1 nor SOAP 1.2 part could be found. This seems to be the case in my example. But I can't understand why. I think, a SOAP 1.1 part is correctly specified in the binding.10 years agoPlace ReadyAPI QuestionsReadyAPI Questions1.3KViews0likes0CommentsHeader part generated also in body in sample request
Hello. I noticed the following behaviour. In my WSDL (v. 1.1), a have a message element with two parts, name them "headerPart" and "bodyPart": [code=php:1t0gx157]<messagename="GetLastTradePriceInput"> <partname="bodyPart"element="xsd1:TradePriceRequest"/> <partname="headerPart"element="xsd1:HeaderElement"/> </message>[/code:1t0gx157] In the binding section, I have the following, i.e. the "headerPart" should go to the SOAP header, and the bodyPart should go to the SOAP body: [code=php:1t0gx157]<input> <soap:headermessage="tns:GetLastTradePriceInput"part="headerPart"use="literal"/> <soap:bodymessage="tns:GetLastTradePriceInput"part="bodyPart"use="literal"/> </input>[/code:1t0gx157] But in the sample request generated by SoapUI (I tried 4.6.1 and 5.0.0), the HeaderElement is generated both in the header and in the body of the SOAP request, i.e. I get this: [code=php:1t0gx157]<soapenv:Envelopexmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"xmlns:stoc="http://example.com/stockquote.xsd"> <soapenv:Header> <stoc:HeaderElement> <value>?</value> </stoc:HeaderElement> </soapenv:Header> <soapenv:Body> <stoc:TradePriceRequest> <tickerSymbol>?</tickerSymbol> </stoc:TradePriceRequest> <stoc:HeaderElement> <value>?</value> </stoc:HeaderElement> </soapenv:Body> </soapenv:Envelope>[/code:1t0gx157] Is this correct? Shouldn't the HeaderElement be generated in the SOAP Header only? I attach the whole sample WSDL file (copied from Wikipedia and adjusted to have a two part message)10 years agoPlace ReadyAPI QuestionsReadyAPI Questions1.6KViews0likes2Comments