NuSphere Forums Forum Index
NuSphere Forums
Reply to topic
New Server - Want to refer to external xsd file.


Joined: 23 Oct 2006
Posts: 3
Reply with quote
Hello all.

I'm attempting to use Nusoap to create a web service (soapserver), which uses pre-defined message structures from a central "message" library.

The company already has a central "xml registry" which contains message definitions in XSD files, which we must reference, rather than duplicating in our own wsdl files - this is a company-wide deployment policy directive. This is because they use a messaging backbone that verifies message structure before passing out to endpoints.

How can I create a web service using Nusoap that, instead of creating complexTypes myself in php (I've done plenty for testing purposes), allows me to reference these message elements defined in the external xml registry?

I've tried various ways but nothing seems obvious. Note that I don't want to get into an argument about coding styles etc - I want to simply use Nusoap to create a web service in php that points to existing xxxxxRequest and xxxxxResponse message declarations. Note that some of the xxxxxRequest message definitions are very deep and complex and I don't want to/I'm not allowed to re-create them in my webservice wsdl file.

All wsdl files on our network are supposed to only contain soap framework information rather than also including element definitions.

Any assistance would be greatly appreciated as I'm about to give up using Nusoap and php to do this as I can't find an easy or elegant way to achieve what I need.

If it can't be done at all, then simply respond - "Nusoap can't do what you need to do", rather than argue that I should change my approach.

Kind Regards,

-- D.
View user's profileFind all posts by supermonkeyman2004Send private message
Site Admin

Joined: 13 Jul 2003
Posts: 8344
Reply with quote
well, all your points look resonable but I'm not sure I got this:
Quote:
instead of creating complexTypes

complexTypes are for building WSDL on the fly.
Seems your infrastructure does not "like" this Smile
So, you may write the WSDL yourself according to the rules and respond this file when asked with ?wsdl in the URL (it's just a rough idea, I did not check)

Finally, you can insert DebugBreak() and check how nusoap handles the requests in the debugger (say PhpED IDE)

_________________
The PHP IDE team
View user's profileFind all posts by dmitriSend private messageVisit poster's website


Joined: 23 Oct 2006
Posts: 3
Reply with quote
Hi Dmitri.

Yes, I guest my language was wrong. Here's a fragment I have already defined in an external XSD file....

<element name="registerRequest">
<complexType>
<sequence>
<element ref="ItemRequestInfo">
</sequence>
</complexType>
</element>
<element name="ItemRequestInfo">
<complexType>
<sequence>
<element name="Item" type="ItemType">
</sequence>
</complexType>
</element>
<complexType name="ItemType">
<sequence>
<element name="arg1" type="string">
<element name="arg2" type="string">
<element name="arg3" type="string">
</sequence>
</complexType>

So you can see that there are a mixture of elements created by name, and some complexTypes also defined.

And in my nusoap server definition // wsdl I want to effectively get the following output...

....
<message name="DoRegisterRequest">
<part name="DoRegisterRequest" ref="ext:registerRequest">
</message>

Note that the 2nd "argument" to the part directive is ref=[/] rather than the more usual [b]type=. I believe that if nusoap could accept ref arguments then I would be able to successfully achieve what I need to achieve.

Does anyone have any thoughts on this?

-- Dave.
View user's profileFind all posts by supermonkeyman2004Send private message
New Server - Want to refer to external xsd file.
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
All times are GMT - 5 Hours  
Page 1 of 1  

  
  
 Reply to topic