Note that there are some explanatory texts on larger screens.

plurals
  1. POrequest generation in vb.net soap client
    primarykey
    data
    text
    <p>Take the tripservice wsdl from <a href="http://developers-blog.org/blog/de/2010/03/03/Webservice-testing-with-soapUI" rel="nofollow">this link</a> In this wsdl, I replaced the from element with the below(added nillable as true and added min length and max length restriction).</p> <pre><code>&lt;xs:element minOccurs="0" name="from" nillable="true"&gt; &lt;xs:simpleType&gt; &lt;xs:restriction base="xs:string"&gt; &lt;xs:minLength value="1"/&gt; &lt;xs:maxLength value="12"/&gt; &lt;/xs:restriction&gt; &lt;/xs:simpleType&gt; &lt;/xs:element&gt; </code></pre> <p>Now in my vb.net client i invoked the service by adding service reference, wsdl saved to a local folder.</p> <pre><code>Dim objproxy As New Tripservice.TripPriceServiceFacadeClient Dim gh As New Tripservice.trip gh.adults = 9 gh.duration = 8 gh.rooms = 8 gh.to = "p" objproxy.getTripPrice(gh) </code></pre> <p>It will throw end point not found exception, however i am interested in the request xml that is going. I enabled the trace and found that the below request is generated.</p> <pre><code>&lt;s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/"&gt; &lt;s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"&gt; &lt;getTripPrice xmlns="http://trip.price.service"&gt; &lt;trip xmlns=""&gt; &lt;adults&gt;9&lt;/adults&gt; &lt;duration&gt;8&lt;/duration&gt; &lt;from xsi:nil="true"/&gt; &lt;rooms&gt;8&lt;/rooms&gt; &lt;to&gt;p&lt;/to&gt; &lt;/trip&gt; &lt;/getTripPrice&gt; &lt;/s:Body&gt; &lt;/s:Envelope&gt; </code></pre> <p>The element from xsi:nil="true" is generated, even though i am not touching the element in my vb.net code to generate the request. The element is optional as per the wsdl(min occurs = 0). How can i send a request without the from element name, even passed in the request?</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload