cancel
Showing results for 
Search instead for 
Did you mean: 

How do I include XSD definition inside WSDL?

Former Member
0 Kudos

Hello,

I am pasting the WSDL and XSD (They were sent as a seperate files)

The Name space that was mentioned in the WSDL is different from where I am currently developing .

I would like to do the following 3 things

1. Include XSD inside WSDL definition

2. Change the existing Name space to the ones created now.

(the current name space is *http://abcd.com/SPAG*)

3. Is there any other free software that works like XML SPY?

The reference in the WSDL to the XSD is provided at "schema....... "

If I copy the XSD in place of <xsd schema></xsd schema> tabs

its generating me no message present or null exception

please help ....

The WSDL and XSD are as follows :

-


*WSDL* :

<?xml version="1.0" encoding="UTF-8"?>

<definitions xmlns="http://schemas.xmlsoap.org/wsdl/"

xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"

xmlns:xsd="http://www.w3.org/2001/XMLSchema"

xmlns:n="http://www.abcd.com/application/ws/network"

xmlns:svc="http://www.abcd.com/application/ws/network/service"

targetNamespace="http://www.abcd.com/application/ws/network/service">

<types>

<xsd:schema>

<xsd:import namespace="http://www.abcd.com/application/ws/network" schemaLocation="../schema/Network.xsd"/>

</xsd:schema>

</types>

<message name="NetworksRequest">

<part name="request" element="n:Networks"/>

</message>

<portType name="NetworkPortType">

<operation name="importNetworks">

<input message="svc:NetworksRequest"/>

</operation>

<operation name="deleteNetworks">

<input message="svc:NetworksRequest"/>

</operation>

</portType>

<binding name="NetworkBinding" type="svc:NetworkPortType">

<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>

<operation name="importNetworks">

<soap:operation soapAction="importNetworks"/>

<input><soap:body use="literal"/></input>

</operation>

<operation name="deleteNetworks">

<soap:operation soapAction="deleteNetworks"/>

<input><soap:body use="literal"/></input>

</operation>

</binding>

<service name="Network">

<port name="NetworkPort" binding="svc:NetworkBinding">

<soap:address location="http://localhost:8080/axis/services/Network"/>

</port>

</service>

</definitions>

-


-


XSD :

<schema xmlns="http://www.w3.org/2001/XMLSchema"

xmlns:n="http://www.abcd.com/application/ws/network"

xmlns:nt="http://www.abcd.com/application/ws/networkType"

xmlns:att="http://www.abcd.com/application/ws/entityAttribute"

targetNamespace="http://www.abcd.com/application/ws/network"

elementFormDefault="qualified">

<import namespace="http://www.abcd.com/application/ws/entityAttribute" schemaLocation="../schema/EntityAttribute.xsd"/>

<import namespace="http://www.abcd.com/application/ws/networkType" schemaLocation="../schema/NetworkType.xsd"/>

<!-- Global Element Declarations -->

<element name="Networks" type="n:Networks"/>

<!-- Complex Types -->

<complexType name="Networks">

<sequence>

<element name="Network" type="n:Network" minOccurs="0" maxOccurs="unbounded"/>

</sequence>

</complexType>

<complexType name="Network">

<sequence>

<element name="description" type="n:descriptionString" minOccurs="0"/>

<element name="CustomAttributes" type="n:CustomAttributes" minOccurs="0"/>

</sequence>

<attribute name="name" type="n:nameString" use="required"/>

<attribute name="type" type="nt:nameString" default="General"/>

<attribute name="indenture" type="int"/>

</complexType>

<complexType name="CustomAttributes">

<sequence>

<element ref="att:CustomAttribute" minOccurs="0" maxOccurs="8"/>

</sequence>

</complexType>

<!-- Simple Types -->

<simpleType name="descriptionString">

<restriction base="string">

<maxLength value="64"/>

</restriction>

</simpleType>

<simpleType name="nameString">

<restriction base="string">

<maxLength value="64"/>

</restriction>

</simpleType>

</schema>

1. Please guide me how do I include XSD in the above structure

2. do I need to change NS in all the places in the above structure in order to change the existing name space to the current one?

3. Is there a free software that works like XML Spy in looking at webservice definitions?

Regards,

Nikhil

        • All useful replies will be rewarded ****

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

Change the wsdl will not change your service. I would suggest you to change your service and regenerate the wsdl based on it, otherwise, even if you change the wsdl, it will not reflect your real service.

Regards.

roberti

Former Member
0 Kudos

roberti,

can you gist me how do I do that?

do provide a doc or a blog to help me furthur

thanks,

Nikhil

Former Member
0 Kudos

Hi Nikhil,

You could do this with the help of various tools available such as altova XMLspy.

Here you coudl have the proper options as well user interactive tools to add the XSD in existing wsdl.

For this you don't need to re-generate the wsdl.

In Altova XMLspy, when you open the current wsdl, the existing XSD will open automatically.

You just need to add the modifications in it as per the format of existing XSD elements.

Thanks

Swarup

Former Member
0 Kudos

Ok,

First off all we need to understand your scenario. This wsdl is from your service (if yes, is this an XI service, Abap service, or what kind of service it is?)

If it is not your service and you are the consumer of this service, will you consume it in an integration scenario? If this is the case I think you can modify the wsdl to use it including the schema into it, but I think you could not change the xsd namespaces.

Please, explain a little bit your scenario.

regards.

roberti

Former Member
0 Kudos

roberti,

its IDOC - Soap - Asynchronous

The WSDL specified above is used on the receiver side.

regards,

nikhil

former_member859847
Active Contributor
0 Kudos

Hi Nikhil,

you have wsdl file with you.

in wsdl, we have XSD:schema tag i.e </xsd:sequence>...yes

before that tag u need to insert the XSD what u have.

but u r xsd tags are like.. -<complex Type name>

but u need tomodify the above tags as mentioned below.

</xsd:simpleType>

</xsd:element>

</xsd:sequence>

</xsd:complexType>

it is some what tedious work i.e why people prefer tools as alotova XML spy.

if u understand, please follow the above methodology .

regards

mahesh.

Former Member
0 Kudos

Sounds gud mahesh,

wat about the name space change?

Nikhil

former_member859847
Active Contributor
0 Kudos

Hi Nikhil,

Sorry, i forgot abt name space change..it's quiet complex.

i have one doubt, why can't you edit u r XSD and import it as data type?

please let us know your opinion this.

regards

mahesh

Former Member
0 Kudos

The XSL spy isnt working here

so, I cant edit it.

i did as you instructed and tried it s giving no message exists message now

Mahesh, is there a way to edit XSD without XML SPY?

regards,

Nikhil.

former_member859847
Active Contributor
0 Kudos

Hi Nikhil,

first include the following code into u r XSD.

<?xml version="1.0" encoding="UTF-8" ?>

- <xsd:schema targetNamespace="http://abcd.com/SAPAG" xmlns="http://abcd.com/SAPAG" xmlns:xsd="http://www.w3.org/2001/XMLSchema">

please follow the below steps.

- <complexType name="Networks">

make it as <XSD:complexType name="Networks">

-<element name="Networks">

make it as <XSD:element name="Networks">

and similarly -<sequence>

in any XSD the following tag will be there

i.e -<xsd:annotation>

but it's not mandotory...with out that aslo we can import it as data type.

if possible, please check with alredy exiting xsd definations.

regards

mahesh.

Former Member
0 Kudos

Mahesh, I did the following

I havent changed the complexType to simpleType

I did changes like keeping xsd and other things as in ur last post

But even now I get the same message

"No message exists"

@ Raj,

Raj, I have installed that software but how does it convert the XSD to WSDL?

regards,

Nikhil.

Former Member
0 Kudos

Mahesh,

in case if I use XSD for MM (instead of WSDL)

and pick the action and target URL from WSDL (for soap parameters) would that make any difference?

regards,

Nikhil.

Former Member
0 Kudos

Hi,

WSDL is the one which either remote client provide or u need to generate from ID.

XSD u can create it from the tools like XML-SPY,Stylo studio..

So there is a difference in both.

Thnx

Chirag

Former Member
0 Kudos

Chirag,

my requirement is :

I was sent XSD and WSDL as seperate files

(eg : network.wsdl and network.xsd)

and there was a link to the XSD specified in the WSDL

but if I specify WSDL as input to MM, it says "No Message exists"

If I use XSD, it shows up the fields and I can use it for MM

i was trying to include the XSD inside WSDL, which was not possible after repeated attempts by changing the structure of XML

Now, the question is ...

Do I need to ask the client back for the WSDL again or

can I use XSD for MM and look for location and action from the WSDL and use it for entering adapter parameters?

regards,

nikhil.

Edited by: nikhil a on Feb 1, 2008 11:13 AM

Former Member
0 Kudos

Ok nikhil,

Now it is more clear.

The problem is not your wsdl file. Forget it for MM.

For your MM, import the xsd you have as external definition and use it to create a message interface. Then, with the external definition you can do you MM and with this message interface, your IM.

When you create your message interface with this xsd, it is already in your namespace, so, both problems solved.

Regards.

roberti

Former Member
0 Kudos

ty roberti.

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi,

Check this link were u can find the Editor free down load,do it and do ur requirement.

http://www.liquid-technologies.com/Download.aspx

Regards,

Rajgopal

Reward points if Helpful

Former Member
0 Kudos

Hi,

Check this link were u can find the Editor free down load,do it and do ur requirement.

http://www.altova.com/download.html

Regards,

Phani

Reward points if Helpful

Former Member
0 Kudos

Phani,

I have installed it.

but I dont get the activation code to my email inspite of 15 repeated trials

Is there an alternate software for XML SPY?

Edited by: nikhil a on Feb 1, 2008 6:28 AM