RE: openPegasus WS-Management WSDL

"Pierre Pacchioni" <[email protected]> Mon, 13 Aug 2012 18:39:45 +0200
Newsgroups gmane.network.open-pegasus.general
Message-ID <[email protected]>
A quick follow-up.

It works the only “trick” is to replace the defaut soapUI content-type=application/soap+xml by the more “basic” content-type=text/xml.

I found the problem using fiddler which as opposed to soapUI has a dft content-type set to json.

 

Pierre.

 

From: Pierre Pacchioni [mailto:[email protected]] 
Sent: 11 August 2012 18:10
To: 'Kirk Augustin'; [email protected]
Subject: RE: openPegasus WS-Management WSDL

 

Hello Kirk,

I’m not sure I understand your answer/remark.

WS-Management is completely described with WSDL and its associated schema xsd.

“WSDL files are crucial to testing SOAP-based services; they define the actual contract a service exposes and are required by soapUI to generate tests, messages, validations and MockServices.”. 

Of course I’m not sending WSDL to OpenPegasus but I’m using the WSDL to generate the “stub/skeleton” to allow soapUI to talk (send Enumerate requests in this case) to openPegasus via the SOAP protocol with the correct format.

You can look at the trace I put on my previous email,  the server (openPegasus) received a correct request (in fact it’s exactly the same as the one via wbemexec). The only difference is/seems to be in the HTTP header.

For instance if I want to write a C++ client talking to OpenPegasus via WS-Management, I should be able to use gSoap for instance, generating the stub from the WS-Management WSDL file. This is pretty common with WSDL/Soap development. soapUI is just a really convenient way to test a WSDL/Soap server (by that I mean a server which implements service(s) described in WSDL and accessible via SOAP),

I hope it is clearer,

Pierre.

 

 

From: Kirk Augustin [mailto:[email protected]] 
Sent: 11 August 2012 06:29
To: Pierre Pacchioni; [email protected]
Subject: Re: openPegasus WS-Management WSDL

 

I am not that familiar with SOAP, but I would not expext WSDL to be able to return anything of significance with Pegasus.
That is because the point of Pegasus is to allow you to make a connection with a number of providers that are not part of Pegasus, but have merely registered with Pegasus.
The point of WSDL in SOAP is much more detailed than just making a connection to a provider.
In fact, I don't really see the point of WSDL.
You need to know all about a provider or library in order to successfully access and use it, and you can not going to be able to adapt just from some XML you get back from a WSDL interrogation.
That would be like saying all you need to know about an operating system should be available from a single call to the operation system.
And that never has been true or ever would work.
The reality is that in order to be able to use a provider, whether it is Pegasus that helps you make a connection to the provider or not, you are not going to be able to do that from what ever you would get back from a WSDL call.
The provider interface includes thing like method calls and parameter passing, and WSDL is simply inadequate.

 

 

Kirk & Trish Augustin
11821 NW McNamee Rd
Portland, OR 97231

HM: 503-289-4356

  _____  

From: Pierre Pacchioni <[email protected]>
To: [email protected] 
Sent: Friday, August 10, 2012 12:19 PM
Subject: RE: openPegasus WS-Management WSDL

 

Really no feedback?

Could you please indicate which WSDL is used for openPegasus? 

 

Thanks and regards,

Pierre.

 

 

 

Hello,

 

We tried to access our CIMOM Pegasus server with the WS-Management protocol using soapUI (http://www.soapui.org/)

Currently we can access it with WinRM and wbemexec without any problem but we would also like to use soapUI for unit tests.

To be able to use soapUI it is necessary to start from the WSDL. We first tried to start from the WSDL located in this place:

http://dmtf.org/standards/wsman

We first tried the http://schemas.dmtf.org/wbem/wsman/1/dsp8037_1.0.wsdl since we are mainly interested in Enumerate/Pull operations but soapUI failed to create the associated project with the following error:

Description: cid:[email protected]

 

Then we tried http://schemas.xmlsoap.org/ws/2005/06/management/wsman.wsdl and this time soapUI created the project without any error.

But the EnumerateOp failed. On the client we received:

<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://www.w3.org/2003/05/soap-envelope" xmlns:SOAP-ENC="http://www.w3.org/2003/05/soap-encoding" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:wsman="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd" xmlns:wsmb="http://schemas.dmtf.org/wbem/wsman/1/cimbinding.xsd" xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:wxf="http://schemas.xmlsoap.org/ws/2004/09/transfer" xmlns:wsen="http://schemas.xmlsoap.org/ws/2004/09/enumeration" xmlns:wse="http://schemas.xmlsoap.org/ws/2004/08/eventing" xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl" xmlns:wscim="http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2">

   <SOAP-ENV:Header>

      <wsa:To>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous <http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous%3c/wsa:To> </wsa:To>

      <wsa:Action>http://schemas.dmtf.org/wbem/wsman/1/wsman/fault <http://schemas.dmtf.org/wbem/wsman/1/wsman/fault%3c/wsa:Action> </wsa:Action>

      <wsa:MessageID>uuid:00003D6C-4AE1-6784-18BE-000048230029</wsa:MessageID>

   </SOAP-ENV:Header>

   <SOAP-ENV:Body>

      <SOAP-ENV:Fault>

         <SOAP-ENV:Code>

            <SOAP-ENV:Value>SOAP-ENV:Sender</SOAP-ENV:Value>

            <SOAP-ENV:Subcode>

               <SOAP-ENV:Value>wsman:EncodingLimit</SOAP-ENV:Value>

            </SOAP-ENV:Subcode>

         </SOAP-ENV:Code>

         <SOAP-ENV:Detail>

            <wsman:FaultDetail>http://schemas.dmtf.org/wbem/wsman/1/wsman/faultDetail/CharacterSet <http://schemas.dmtf.org/wbem/wsman/1/wsman/faultDetail/CharacterSet%3c/wsman:FaultDetail> </wsman:FaultDetail>

         </SOAP-ENV:Detail>

      </SOAP-ENV:Fault>

   </SOAP-ENV:Body>

</SOAP-ENV:Envelope>

 

The error seems to link to a bad “character set” (encoding):

<wsman:FaultDetail>http://schemas.dmtf.org/wbem/wsman/1/wsman/faultDetail/CharacterSet <http://schemas.dmtf.org/wbem/wsman/1/wsman/faultDetail/CharacterSet%3c/wsman:FaultDetail> </wsman:FaultDetail>

But since we are using utf-8 it seems a bit strange.

On the server side we got:

 

1344540889s-605446us: XmlIO [12048:18446744073709551614:HTTPConnection.cpp:2320]: <!-- Request: queue id: 19 -->

POST /wsman HTTP/1.1

Accept-Encoding: gzip,deflate

Content-Type: application/soap+xml;charset=UTF-8;action=" <http://schemas.xmlsoap.org/ws/2004/09/enumeration/Enumerate> http://schemas.xmlsoap.org/ws/2004/09/enumeration/Enumerate"

Content-Length: 1119

Host: localhost:5988

Connection: Keep-Alive

User-Agent: Apache-HttpClient/4.1.1 (java 1.5)

 

 

<s:Envelope xmlns:s="http://www.w3.org/2003/05/soap-envelope" 

            xmlns:a="http://schemas.xmlsoap.org/ws/2004/08/addressing" 

            xmlns:wse="http://schemas.xmlsoap.org/ws/2004/09/enumeration"

            xmlns:w="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd">

<s:Header><a:To>http://localhost/wsman <http://localhost/wsman%3c/a:To> </a:To>

<w:ResourceURI s:mustUnderstand="true">

  http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_PCIDevice

</w:ResourceURI>

<a:ReplyTo>

  <a:Address s:mustUnderstand="true">

    http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous

  </a:Address>

</a:ReplyTo>

<a:Action s:mustUnderstand="true">

  http://schemas.xmlsoap.org/ws/2004/09/enumeration/Enumerate

</a:Action>

<w:MaxEnvelopeSize s:mustUnderstand="true">1536000</w:MaxEnvelopeSize>

<a:MessageID>uuid:00000000-0000-0000-0005-000000000001</a:MessageID>

<w:Locale xml:lang="en-US" s:mustUnderstand="false" />

<w:SelectorSet>

<w:Selector Name="__cimnamespace">root/cimv2</w:Selector>

</w:SelectorSet>

<w:OperationTimeout>PT60.000S</w:OperationTimeout>

</s:Header>

<s:Body>

<wse:Enumerate>

 

</wse:Enumerate>

</s:Body>

</s:Envelope>

 

1344540889s-605446us: Http [12048:18446744073709551614:HTTPConnection.cpp:2335]: Now setting state to 1

1344540889s-605446us: Http [12048:18446744073709551614:HTTPAuthenticatorDelegator.cpp:293]: HTTPAuthenticatorDelegator - HTTP processing start

1344540889s-605446us: Authentication [12048:18446744073709551614:HTTPAuthenticatorDelegator.cpp:422]: HTTPAuthenticatorDelegator - Authentication processing start

1344540889s-605446us: Authentication [12048:18446744073709551614:HTTPAuthenticatorDelegator.cpp:1102]: HTTPAuthenticatorDelegator - Authentication processing ended

1344540889s-605446us: MessageQueueService [12048:18446744073709551614:MessageQueue.cpp:122]: Queue name: [WsmRequestDecoder], Message: [HTTP_MESSAGE]

1344540889s-605446us: WsmServer [12048:18446744073709551614:WsmRequestDecoder.cpp:194]: WsmRequestDecoder::handleHTTPMessage()- httpMessage->getCloseConnect() returned 0

1344540889s-605446us: WsmServer [12048:18446744073709551614:WsmResponseEncoder.cpp:165]: WsmResponseEncoder::enqueue()- response->getHttpCloseConnect() returned 0

1344540889s-605446us: WsmServer [12048:18446744073709551614:WsmResponseEncoder.cpp:64]: WsmResponseEncoder::sendResponse()

1344540889s-605446us: WsmServer [12048:18446744073709551614:WsmResponseEncoder.cpp:78]: WsmResponseEncoder::sendResponse()- response->getHttpCloseConnect() returned 0

1344540889s-605446us: Http [12048:18446744073709551614:HTTPConnection.cpp:391]: HTTPConnection::handleEnqueue - HTTP_MESSAGE

1344540889s-605446us: Http [12048:18446744073709551614:HTTPConnection.cpp:921]: HTTPConnection::_handleWriteEvent: Server write event.

1344540889s-605446us: XmlIO [12048:18446744073709551614:HTTPConnection.cpp:929]: <!-- Response: queue id: 19 -->

HTTP/1.1 500 Internal Server Error

Content-Type: application/soap+xml;charset=UTF-8

content-length: 0000001507

 

SOAPAction: http://schemas.dmtf.org/wbem/wsman/1/wsman/fault

 

The exact same request with wbemexec gives the following server trace:

 

POST /wsman HTTP/1.1

PegasusAuthorization: Local "NET\pacchioni"

Host: 

Content-Type: application/soap+xml; charset=utf-8

Content-Length: 1119

 

<s:Envelope xmlns:s="http://www.w3.org/2003/05/soap-envelope" 

            xmlns:a="http://schemas.xmlsoap.org/ws/2004/08/addressing" 

            xmlns:wse="http://schemas.xmlsoap.org/ws/2004/09/enumeration"

            xmlns:w="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd">

<s:Header><a:To>http://localhost/wsman <http://localhost/wsman%3c/a:To> </a:To>

<w:ResourceURI s:mustUnderstand="true">

  http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_PCIDevice

</w:ResourceURI>

<a:ReplyTo>

  <a:Address s:mustUnderstand="true">

    http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous

  </a:Address>

</a:ReplyTo>

<a:Action s:mustUnderstand="true">

  http://schemas.xmlsoap.org/ws/2004/09/enumeration/Enumerate

</a:Action>

<w:MaxEnvelopeSize s:mustUnderstand="true">1536000</w:MaxEnvelopeSize>

<a:MessageID>uuid:00000000-0000-0000-0005-000000000001</a:MessageID>

<w:Locale xml:lang="en-US" s:mustUnderstand="false" />

<w:SelectorSet>

<w:Selector Name="__cimnamespace">root/cimv2</w:Selector>

</w:SelectorSet>

<w:OperationTimeout>PT60.000S</w:OperationTimeout>

</s:Header>

<s:Body>

<wse:Enumerate>

 

</wse:Enumerate>

</s:Body>

</s:Envelope>

 

Could you please indicate which WSDL is used for openPegasus? 

Do you have any idea how to solve this problem?  I see small differences in the HTTP header but nothing related to the CaracterSet,

 

Thanks for your help,

Pierre.
image001.png (image/png, 27.4 KB) - not displayed