File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Web Services and the fly likes Problem with SOAP Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Web Services
Bookmark "Problem with SOAP" Watch "Problem with SOAP" New topic
Author

Problem with SOAP

JuanP barbancho
Ranch Hand

Joined: Oct 25, 2005
Posts: 52
Any fool can write code that a computer can understand. Good programmers write code that humans can understand. (Fowler)

Debug only code - comments can lie.

If you have too many special cases, you are doing it wrong.

Get your data structures correct first, and the rest of the program will write itself.

Testing can show the presence of bugs, but not their absence.

The first step in fixing a broken program is getting it to fail repeatedly.

The fastest algorithm can frequently be replaced by one that is almost as fast and much easier to understand.
Hi,

I have a SOAP servlet, but It is the fist SOAPServlet as I use.

I think that the vsd that developper of SOAP servlet provide is ok.

But, I do not understand which is the XML that I could provide to it.

It is posible that I have a problem with XML, SCHEMA and SOAP.

Could you help me , I attach the VSD, but I need a tool or a sample file in order to call my SOAP servlet.



Thanks you
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 39548
    
  27
Juan, your post doesn't make it clear what exactly it is you're asking. Thinking about (and possibly answering) the following question will make it easier to describe your problem:

- What is the VSD thing you mention?
- You posted a schema definition of some complex types. How is that related to the web service? Does the WS use some of these types? Is it part of a WSDL description?
- Do you have a client to access the WS, or are you trying to develop one? If so, what do you have so far, and where are you stuck?
- Are the quotes at the top of your message somehow related to the problem at hand? If not, leave them out, or put them in your signature and reduce the vertical space they take up.


Ping & DNS - updated with new look and Ping home screen widget
JuanP barbancho
Ranch Hand

Joined: Oct 25, 2005
Posts: 52
Sorry,

I review my email and I see thank I cut and paste some information that I have into my clipboard.

I resend my original email:

Hi,

I have a SOAP servlet, but It is the fist SOAPServlet as I use.

I think that the vsd that developper of SOAP servlet provide is ok.

But, I do not understand which is the XML that I could provide to it.

It is posible that I have a problem with XML, SCHEMA and SOAP.

Could you help me , I attach the VSD, but I need a tool or a sample file in order to call my SOAP servlet.


XSD Esquema:
--------------------------------------------------------------------------------

<xsd:schema xmlns:xsd="http://schemas.xmlsoap.org/soap/encoding"> <xsd:complexType name="STD_TRN1_I_PARM_V_TYPE"> <xsd:sequence> <xsd:element name="COD_TX_DI"> <xsd:simpleType base="xsd:string"> <maxLength value="00004"/> </xsd:simpleType> </xsd:element> <xsd:element name="ID_INTERNO_TERM_TN"> <xsd:simpleType base="xsd:string"> <maxLength value="00008"/> </xsd:simpleType> </xsd:element> <xsd:element name="ID_EMPL_AUT"> <xsd:simpleType base="xsd:string"> <maxLength value="00008"/> </xsd:simpleType> </xsd:element> <xsd:element name="NUM_SEC"> <xsd:simpleType base="xsd ecimal"> <totalDigits value="00007"/> <fractionDigits value="00"/> </xsd:simpleType> </xsd:element> <xsd:element name="COD_TX"> <xsd:simpleType base="xsd:string"> <maxLength value="00008"/> </xsd:simpleType> </xsd:element> </xsd:sequence> </xsd:complexType> <xsd:complexType name="TR_CONS_SALDOS_VISTA_EVT_Y_TYPE"> <xsd:sequence> <xsd:element name="COD_CENT_UO"> <xsd:simpleType base="xsd:string"> <maxLength value="00004"/> </xsd:simpleType> </xsd:element> <xsd:element name="NUM_SEC_AC"> <xsd:simpleType base="xsd ecimal"> <totalDigits value="00010"/> <fractionDigits value="00"/> </xsd:simpleType> </xsd:element> <xsd:element name="COD_NRBE_EN"> <xsd:simpleType base="xsd:string"> <maxLength value="00004"/> </xsd:simpleType> </xsd:element> </xsd:sequence> </xsd:complexType> <xsd:complexType name="STD_TRN1_O_PARM_V_TYPE"> <xsd:sequence> <xsd:element name="HORA_OPRCN" type="xsd:time"/> <xsd:element name="FECHA_OPRCN" type="xsd ate"/> </xsd:sequence> </xsd:complexType> <xsd:complexType name="PSV_DISPO_V_TYPE"> <xsd:sequence> <xsd:element name="STD_DEC_15Y2"> <xsd:simpleType base="xsd ecimal"> <totalDigits value="00015"/> <fractionDigits value="02"/> </xsd:simpleType> </xsd:element> </xsd:sequence> </xsd:complexType> <xsd:complexType name="PSV_SDO_CONTABLE_V_TYPE"> <xsd:sequence> <xsd:element name="IMP_SDO"> <xsd:simpleType base="xsd ecimal"> <totalDigits value="00015"/> <fractionDigits value="02"/> </xsd:simpleType> </xsd:element> </xsd:sequence> </xsd:complexType> <xsd:complexType name="PSV_SDO_RETEN_V_TYPE"> <xsd:sequence> <xsd:element name="IMP_SDO"> <xsd:simpleType base="xsd ecimal"> <totalDigits value="00015"/> <fractionDigits value="02"/> </xsd:simpleType> </xsd:element> </xsd:sequence> </xsd:complexType> <xsd:complexType name="PSV_SDO_AUT_V_TYPE"> <xsd:sequence> <xsd:element name="IMP_SDO"> <xsd:simpleType base="xsd ecimal"> <totalDigits value="00015"/> <fractionDigits value="02"/> </xsd:simpleType> </xsd:element> </xsd:sequence> </xsd:complexType> <xsd:complexType name="PSV_SDO_INCID_V_TYPE"> <xsd:sequence> <xsd:element name="IMP_SDO"> <xsd:simpleType base="xsd ecimal"> <totalDigits value="00015"/> <fractionDigits value="02"/> </xsd:simpleType> </xsd:element> </xsd:sequence> </xsd:complexType> <xsd:complexType name="PSV_BLOQUEOS_V_TYPE"> <xsd:sequence> <xsd:element name="STD_CHAR_01"> <xsd:simpleType base="xsd:string"> <maxLength value="00001"/> </xsd:simpleType> </xsd:element> </xsd:sequence> </xsd:complexType> <xsd:complexType name="PSV_SDO_CONECT_V_TYPE"> <xsd:sequence> <xsd:element name="IMP_SDO"> <xsd:simpleType base="xsd ecimal"> <totalDigits value="00015"/> <fractionDigits value="02"/> </xsd:simpleType> </xsd:element> </xsd:sequence> </xsd:complexType> <xsd:complexType name="COD_IDIOMA_V_TYPE"> <xsd:sequence> <xsd:element name="COD_IDIOMA"> <xsd:simpleType base="xsd:string"> <maxLength value="00002"/> </xsd:simpleType> </xsd:element> </xsd:sequence> </xsd:complexType> <xsd:complexType name="PSV_ANOTACIONES_V_TYPE"> <xsd:sequence> <xsd:element name="STD_CHAR_01"> <xsd:simpleType base="xsd:string"> <maxLength value="00001"/> </xsd:simpleType> </xsd:element> </xsd:sequence> </xsd:complexType> <xsd:complexType name="TR_CONS_SALDOS_VISTA_EVT_Z_TYPE"> <xsd:sequence> <xsd:element name="COD_NUMRCO_MONEDA"> <xsd:simpleType base="xsd:string"> <maxLength value="00003"/> </xsd:simpleType> </xsd:element> <xsd:element name="PSV_DISPO_V" type="PSV_DISPO_V_TYPE"/> <xsd:element name="PSV_SDO_CONTABLE_V" type="PSV_SDO_CONTABLE_V_TYPE"/> <xsd:element name="PSV_SDO_RETEN_V" type="PSV_SDO_RETEN_V_TYPE"/> <xsd:element name="PSV_SDO_AUT_V" type="PSV_SDO_AUT_V_TYPE"/> <xsd:element name="PSV_SDO_INCID_V" type="PSV_SDO_INCID_V_TYPE"/> <xsd:element name="PSV_BLOQUEOS_V" type="PSV_BLOQUEOS_V_TYPE"/> <xsd:element name="PSV_SDO_CONECT_V" type="PSV_SDO_CONECT_V_TYPE"/> <xsd:element name="COD_CSB_OF"> <xsd:simpleType base="xsd:string"> <maxLength value="00004"/> </xsd:simpleType> </xsd:element> <xsd:element name="NOMB_50"> <xsd:simpleType base="xsd:string"> <maxLength value="00050"/> </xsd:simpleType> </xsd:element> <xsd:element name="COD_INTERNO_UO"> <xsd:simpleType base="xsd:string"> <maxLength value="00004"/> </xsd:simpleType> </xsd:element> <xsd:element name="COD_IDIOMA_V" type="COD_IDIOMA_V_TYPE"/> <xsd:element name="PSV_ANOTACIONES_V" type="PSV_ANOTACIONES_V_TYPE"/> </xsd:sequence> </xsd:complexType> <xsd:complexType name="STD_TRN1_MSJ_PARM_V_TYPE"> <xsd:sequence> <xsd:element name="TEXT_ARG1"> <xsd:simpleType base="xsd:string"> <maxLength value="00018"/> </xsd:simpleType> </xsd:element> <xsd:element name="TEXT_CODE" type="xsd:int"/> </xsd:sequence> </xsd:complexType> <xsd:complexType name="TR_CONS_SALDOS_VISTA_TRN1"> <xsd:complexType name="TR_CONS_SALDOS_VISTA_TRN1_O_TYPE"> <xsd:sequence> <xsd:element name="RTRN_CD" type="xsd:int"/> <xsd:element name="STD_TRN1_O_PARM_V" type="STD_TRN1_O_PARM_V_TYPE"/> <xsd:element name="TR_CONS_SALDOS_VISTA_EVT_Z" type="TR_CONS_SALDOS_VISTA_EVT_Z_TYPE"/> <xsd:complexType name="STD_TRN1_MSJ_PARM_V_OCCURS"> <xsd:element name="STD_TRN1_MSJ_PARM_V" type="STD_TRN1_MSJ_PARM_V_TYPE" maxOccurs="000005"/> </xsd:complexType> </xsd:sequence> </xsd:complexType> <xsd:complexType name="TR_CONS_SALDOS_VISTA_TRN1_I_TYPE"> <xsd:sequence> <xsd:element name="STD_TRN1_I_PARM_V" type="STD_TRN1_I_PARM_V_TYPE"/> <xsd:element name="TR_CONS_SALDOS_VISTA_EVT_Y" type="TR_CONS_SALDOS_VISTA_EVT_Y_TYPE"/> </xsd:sequence> </xsd:complexType> </xsd:complexType> </xsd:schema>

XSD:SCHEMA---------------------------------------------------------------------------------------------
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 39548
    
  27
You did not answer ane of the questions in my earlier post. Those are more important than the Schema you re-posted (which is now totally unintellegible due to no formatting).
[ October 27, 2005: Message edited by: Ulf Dittmer ]
Pradeep bhatt
Ranch Hand

Joined: Feb 27, 2002
Posts: 8898

Ulf,

I think he/she meant XSD instead of VSD.


Groovy
JuanP barbancho
Ranch Hand

Joined: Oct 25, 2005
Posts: 52
Sorry, XSD.
I need a tool or some help

the schema:

<xsd:schema xmlns:xsd="http://schemas.xmlsoap.org/soap/encoding">

<xsd:complexType name="STD_TRN1_I_PARM_V_TYPE">
<xsd:sequence>
<xsd:element name="COD_TX_DI">
<xsd:simpleType base="xsd:string">
<maxLength value="00004"/>
</xsd:simpleType>
</xsd:element>
<xsd:element name="ID_INTERNO_TERM_TN">
<xsd:simpleType base="xsd:string">
<maxLength value="00008"/>
</xsd:simpleType>
</xsd:element>
<xsd:element name="ID_EMPL_AUT">
<xsd:simpleType base="xsd:string">
<maxLength value="00008"/>
</xsd:simpleType>
</xsd:element>
<xsd:element name="NUM_SEC">
<xsd:simpleType base="xsd:decimal">
<totalDigits value="00007"/>
<fractionDigits value="00"/>
</xsd:simpleType>
</xsd:element>
<xsd:element name="COD_TX">
<xsd:simpleType base="xsd:string">
<maxLength value="00008"/>
</xsd:simpleType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>

<xsd:complexType name="TR_CONS_SALDOS_VISTA_EVT_Y_TYPE">
<xsd:sequence>
<xsd:element name="COD_CENT_UO">
<xsd:simpleType base="xsd:string">
<maxLength value="00004"/>
</xsd:simpleType>
</xsd:element>
<xsd:element name="NUM_SEC_AC">
<xsd:simpleType base="xsd:decimal">
<totalDigits value="00010"/>
<fractionDigits value="00"/>
</xsd:simpleType>
</xsd:element>
<xsd:element name="COD_NRBE_EN">
<xsd:simpleType base="xsd:string">
<maxLength value="00004"/>
</xsd:simpleType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>

<xsd:complexType name="STD_TRN1_O_PARM_V_TYPE">
<xsd:sequence>
<xsd:element name="HORA_OPRCN" type="xsd:time"/>
<xsd:element name="FECHA_OPRCN" type="xsd:date"/>
</xsd:sequence>
</xsd:complexType>

<xsd:complexType name="PSV_DISPO_V_TYPE">
<xsd:sequence>
<xsd:element name="STD_DEC_15Y2">
<xsd:simpleType base="xsd:decimal">
<totalDigits value="00015"/>
<fractionDigits value="02"/>
</xsd:simpleType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>

<xsd:complexType name="PSV_SDO_CONTABLE_V_TYPE">
<xsd:sequence>
<xsd:element name="IMP_SDO">
<xsd:simpleType base="xsd:decimal">
<totalDigits value="00015"/>
<fractionDigits value="02"/>
</xsd:simpleType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>

<xsd:complexType name="PSV_SDO_RETEN_V_TYPE">
<xsd:sequence>
<xsd:element name="IMP_SDO">
<xsd:simpleType base="xsd:decimal">
<totalDigits value="00015"/>
<fractionDigits value="02"/>
</xsd:simpleType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>

<xsd:complexType name="PSV_SDO_AUT_V_TYPE">
<xsd:sequence>
<xsd:element name="IMP_SDO">
<xsd:simpleType base="xsd:decimal">
<totalDigits value="00015"/>
<fractionDigits value="02"/>
</xsd:simpleType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>

<xsd:complexType name="PSV_SDO_INCID_V_TYPE">
<xsd:sequence>
<xsd:element name="IMP_SDO">
<xsd:simpleType base="xsd:decimal">
<totalDigits value="00015"/>
<fractionDigits value="02"/>
</xsd:simpleType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>

<xsd:complexType name="PSV_BLOQUEOS_V_TYPE">
<xsd:sequence>
<xsd:element name="STD_CHAR_01">
<xsd:simpleType base="xsd:string">
<maxLength value="00001"/>
</xsd:simpleType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>

<xsd:complexType name="PSV_SDO_CONECT_V_TYPE">
<xsd:sequence>
<xsd:element name="IMP_SDO">
<xsd:simpleType base="xsd:decimal">
<totalDigits value="00015"/>
<fractionDigits value="02"/>
</xsd:simpleType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>

<xsd:complexType name="COD_IDIOMA_V_TYPE">
<xsd:sequence>
<xsd:element name="COD_IDIOMA">
<xsd:simpleType base="xsd:string">
<maxLength value="00002"/>
</xsd:simpleType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>

<xsd:complexType name="PSV_ANOTACIONES_V_TYPE">
<xsd:sequence>
<xsd:element name="STD_CHAR_01">
<xsd:simpleType base="xsd:string">
<maxLength value="00001"/>
</xsd:simpleType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>

<xsd:complexType name="TR_CONS_SALDOS_VISTA_EVT_Z_TYPE">
<xsd:sequence>
<xsd:element name="COD_NUMRCO_MONEDA">
<xsd:simpleType base="xsd:string">
<maxLength value="00003"/>
</xsd:simpleType>
</xsd:element>
<xsd:element name="PSV_DISPO_V" type="PSV_DISPO_V_TYPE"/>
<xsd:element name="PSV_SDO_CONTABLE_V" type="PSV_SDO_CONTABLE_V_TYPE"/>
<xsd:element name="PSV_SDO_RETEN_V" type="PSV_SDO_RETEN_V_TYPE"/>
<xsd:element name="PSV_SDO_AUT_V" type="PSV_SDO_AUT_V_TYPE"/>
<xsd:element name="PSV_SDO_INCID_V" type="PSV_SDO_INCID_V_TYPE"/>
<xsd:element name="PSV_BLOQUEOS_V" type="PSV_BLOQUEOS_V_TYPE"/>
<xsd:element name="PSV_SDO_CONECT_V" type="PSV_SDO_CONECT_V_TYPE"/>
<xsd:element name="COD_CSB_OF">
<xsd:simpleType base="xsd:string">
<maxLength value="00004"/>
</xsd:simpleType>
</xsd:element>
<xsd:element name="NOMB_50">
<xsd:simpleType base="xsd:string">
<maxLength value="00050"/>
</xsd:simpleType>
</xsd:element>
<xsd:element name="COD_INTERNO_UO">
<xsd:simpleType base="xsd:string">
<maxLength value="00004"/>
</xsd:simpleType>
</xsd:element>
<xsd:element name="COD_IDIOMA_V" type="COD_IDIOMA_V_TYPE"/>
<xsd:element name="PSV_ANOTACIONES_V" type="PSV_ANOTACIONES_V_TYPE"/>
</xsd:sequence>
</xsd:complexType>

<xsd:complexType name="STD_TRN1_MSJ_PARM_V_TYPE">
<xsd:sequence>
<xsd:element name="TEXT_ARG1">
<xsd:simpleType base="xsd:string">
<maxLength value="00018"/>
</xsd:simpleType>
</xsd:element>
<xsd:element name="TEXT_CODE" type="xsd:int"/>
</xsd:sequence>
</xsd:complexType>

<xsd:complexType name="TR_CONS_SALDOS_VISTA_TRN1">
<xsd:complexType name="TR_CONS_SALDOS_VISTA_TRN1_O_TYPE">
<xsd:sequence>
<xsd:element name="RTRN_CD" type="xsd:int"/>
<xsd:element name="STD_TRN1_O_PARM_V" type="STD_TRN1_O_PARM_V_TYPE"/>
<xsd:element name="TR_CONS_SALDOS_VISTA_EVT_Z" type="TR_CONS_SALDOS_VISTA_EVT_Z_TYPE"/>
<xsd:complexType name="STD_TRN1_MSJ_PARM_V_OCCURS">
<xsd:element name="STD_TRN1_MSJ_PARM_V" type="STD_TRN1_MSJ_PARM_V_TYPE" maxOccurs="000005"/>
</xsd:complexType>
</xsd:sequence>
</xsd:complexType>

<xsd:complexType name="TR_CONS_SALDOS_VISTA_TRN1_I_TYPE">
<xsd:sequence>
<xsd:element name="STD_TRN1_I_PARM_V" type="STD_TRN1_I_PARM_V_TYPE"/>
<xsd:element name="TR_CONS_SALDOS_VISTA_EVT_Y" type="TR_CONS_SALDOS_VISTA_EVT_Y_TYPE"/>
</xsd:sequence>
</xsd:complexType>

</xsd:complexType>

</xsd:schema>
Peer Reynders
Bartender

Joined: Aug 19, 2005
Posts: 2906
The schema (xsd) only tells us what data types are used when you exchange information with the SOAP servlet - it doesn't tell us how they are used to complete the information exchange. What you need is a specification of the contract of what your request(s) can and should look like and what the responses would look like. For web services that use SOAP messages that contract is specified through the WSDL (Web services description language) file (which is what Ulf asked for). The WSDL file can be used by various tools to generate the code for stubs/proxies for your program to use, so that you don't have to deal with XML or SOAP directly (at this point it is not clear whether your SOAP servlet behaves like a SOAP web service). The WSDL looks something like this:



"Don't succumb to the false authority of a tool or model. There is no substitute for thinking."
Andy Hunt, Pragmatic Thinking & Learning: Refactor Your Wetware p.41
JuanP barbancho
Ranch Hand

Joined: Oct 25, 2005
Posts: 52
Hi,

I understand that you send to me a WSDL file.

I need the SOAP file for the XSD that I send in the previous post.

I need some help in order to understand how the XSD describe the SOAP file.
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 39548
    
  27
There is no "SOAP for a XSD/Schema file". A schema can describe part of a SOAP message, but by itself is not sufficient to generate a SOAP message. A WSDL file can describe a web service in sufficient detail that you can build a SOAP message with it.
It would help if you described in more detail what you are trying to do. Unfortunately you are ignoring the questions I asked in my first post; answering them would help us help you.
JuanP barbancho
Ranch Hand

Joined: Oct 25, 2005
Posts: 52
Sorry,

I forgot read the complete Thread.

- What is the VSD thing you mention?

I only have the XSD of input to SOAP servlet.

- You posted a schema definition of some complex types. How is that related to the web service? Does the WS use some of these types? Is it part of a WSDL description?

I think that I need include it in a WSDL description, but I unknow the point to add the XSD.

I need only call to SOAP service with a XML.
I need understand the XML that I need send.
Now, I unknow the format of XML to send, I do not understand XSD definition,

Please, I think that the problem is that the SOAP servlet developper do not provide to me the correct WSDL, but I need send to us how could be the correct WSDL, and I need test that the SOAP servlet run.
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 39548
    
  27
Several points in no particular roder:

1) If you have an incorrect WSDL, trying to access the web service won't work.

2) A Schema (XSD) definition is part of the WSDL, which the client doesn't generate - the server does. Having the XSD of some data type that may be transferred through the web service does not help in accessing it. See #1.

3) I would advise not to try coding the XML you send to the web service by hand. Use a Java API like SAAJ or JAX-RPC.

4) Using a tool like wsdl2java (which comes with Axis) greatly simplifies coding the client, but, again, you need the proper WSDL.

To sum it up: Your attempts in fixing the WSDL you have (if it is indeed incorrect) most likely will not amount to anything. Obtain the ocrrect WSDL, and things should progress much more smoothly.
Pradeep bhatt
Ranch Hand

Joined: Feb 27, 2002
Posts: 8898

JuanP

The XSD definitions should come under the schema tag which is the child tag of types element.
Here is an example

http://www.roguewave.com/support/docs/leif/leif/html/leifug/B-3.html
[ October 28, 2005: Message edited by: Pradip Bhat ]
JuanP barbancho
Ranch Hand

Joined: Oct 25, 2005
Posts: 52
Sorry,

I try to explain well.

I have a "litle problem", I do not could make the WebService, I do not have the source code.

I only have received via email the XSD, nor the wsdl, the port and the URI.

This code have been generated by a Customer, I report to them that I need the WSDL but they say that Other people do not need and they do not generated.

I cannot press to my customer , when other people use.

Could you help me a litte more. I see the XSD sample but I do not see the SOAP message that define this XSD.

I apologyzed the use of non estandar Web Services, but The customer is The customer
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 39548
    
  27
Juan, it has nothing to do with being a "non-standard" web service. It is not a web service. You need to know lots more things, like URL, port, service name, parameters, methods, authentication, etc.
If your customer says the XSD is sufficient (but you don't even know what it's for), he is simply wrong - you need more information.
[ October 28, 2005: Message edited by: Ulf Dittmer ]
JuanP barbancho
Ranch Hand

Joined: Oct 25, 2005
Posts: 52
Ok,

This is not a WebService, is only a servlet that return and receive SOAP, but

Wich SOAP message I could send acording the XSD ?

I agree that my Customer need generate the WSDL, but It is a very large process and I need generate this input SOAP.

I think that you understand the complexity of my question, I could call a WebService because I don not have a WebService, but I need Know the SOAP that defined this XSD, or if you could explain that defined this XSD ?
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 39548
    
  27
Juan,
I don't know how to put it more clearly: What you have is not a WS definition, it is an excerpt from a schema. How that relates to a WS is completely undefined. You can not make a WS call based on that alone, period. With that schema any number of SOAP calls are possible, and your customer needs to tell you which one it is, or at least provide you with a sample SOAP document.

This is not a WebService, is only a servlet that return and receive SOAP,


A servlet that accepts and returns SOAP is a web service by most definitions. But as long as you don't know what SOAP documents it accepts, it seems to be of little use.
JuanP barbancho
Ranch Hand

Joined: Oct 25, 2005
Posts: 52
Sorry,

My customer says that they send to me the XSD of the SOAP Servlet.

The question that I make, What is XSD, how Make a XML with a XSD.

When I know this, I could make the SOAP ENV for the XML and test.


Customers, ... !!!
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 39548
    
  27
Assuming that the contents of the schema mean anything to you, you could instantiate it, send that as body of a soap message, and see what happens. Better to do that against a test system, though.

Maybe the WS is not an RPC-type, where you need to know method names, parameters and so forth, but a document-type, where you send an XML document and receive one back (both of which presumably have some meaning to both you and the customer).
[ October 31, 2005: Message edited by: Ulf Dittmer ]
Eddy Lee Sin Ti
Ranch Hand

Joined: Oct 06, 2005
Posts: 135
I pity your situation. In fact, all customers are the same.

XML Schema only defines the valid data types and structure of these data types that you might want to use in XML document instance. In no way, it will tell you what operations, messages and underlying protocol bindings and location of the services. A WSDL document tells you those.

You will need WSDL document for java client which use generated stub and dynamic proxy model. Without WSDL document, you might just need to use Dynamic Invocation Interface (DII) to dynamically discover the service endpoint and construct messages to invoke it. Complexity of DII is high compared to other two.


SCJP, SCWCD, SCJWS, IBM 700,IBM 701, IBM 704, IBM 705, CA Clarity Technical<br /> <br /><a href="http://eddyleesinti.blogspot.com" target="_blank" rel="nofollow">http://eddyleesinti.blogspot.com</a>
JuanP barbancho
Ranch Hand

Joined: Oct 25, 2005
Posts: 52
Ok,

But, how XSD define the content of message ?

That is, If I see

<xsd:element name="COD_TX_DI">
<xsd:simpleType base="xsd:string">
<maxLength value="00004"/>
</xsd:simpleType>
</xsd:element>

This translate to : ....

<COD_TX_DI>
astr
</COD_TX_DI>

Or .....

Thanks

JuanP
Peer Reynders
Bartender

Joined: Aug 19, 2005
Posts: 2906
Originally posted by JuanP barbancho:
I could make the SOAP ENV for the XML and test


How were you going to test it? Did they provide a URL? Have you ever tried a request based on the URL given, like:

to obtain a WSDL? This isn't mandatory but this is one of the ways some services publish their WSDL.
Eddy Lee Sin Ti
Ranch Hand

Joined: Oct 06, 2005
Posts: 135

But, how XSD define the content of message ?

That is, If I see

<xsd:element name="COD_TX_DI">
<xsd:simpleType base="xsd:string">
<maxLength value="00004"/>
</xsd:simpleType>
</xsd:element>


I show you a sample of how WSDL might use XML Schema to describe the message part.



The above example defines a abstract service interface (portType) that has a service operation (a method) that uses a message (tns:SomeOperationRequest), which has a message part based on the types defined in your XML Schema (COD_TX_DI).

How the messages actually exchanged in the wire will depend on the concrete definition of the WSDL document.
Peer Reynders
Bartender

Joined: Aug 19, 2005
Posts: 2906
Originally posted by JuanP barbancho:
But, how XSD define the content of message ?


Usually the XSD referred to within the SOAP request to provide a definition of the types used via the encodingStyle attribute.
Example:



from A SOAP document that specifies the encoding style in Chapter 2. XML Protocols: XML-RPC and SOAP.

The SOAP-ENV:encodingStyle attribute on the getQuote element to point to a schema at the relative URL trading.xsd. This schema defines the symbol element as having the custom type StockSymbol, and is shown in Example 2.21. This schema is just used for assigning types. It is not used for validation, though with a little extra work it could be.
Eddy Lee Sin Ti
Ranch Hand

Joined: Oct 06, 2005
Posts: 135
Peer, you got a point on the utility of XML Schema.

However, the use of soap:encodingStyle is discouraged due to potential interoperability issues as outlined in WS-I Basic Profile 1.0 and above.

Refer to R1005, R1006 and R1007 of the Profile.
Peer Reynders
Bartender

Joined: Aug 19, 2005
Posts: 2906
Originally posted by Eddy Lee Sin Ti:
However, the use of soap:encodingStyle is discouraged due to potential interoperability issues as outlined in WS-I Basic Profile 1.0 and above.


The danger of quoting "old" references in connection with quickly evolving technologies. :roll:
Just keep in mind that we really don't know if we are dealing with a "Web Service" in the conventional sense, much less one that conforms to WS-I Basic Profile 1.0a - we don't even know what version of SOAP is being used. All I've seen so far is the mention of a SOAPServlet - that could mean org.jibx.soap.server.SOAPServlet (or any other SOAPServlet implementation), it could be an SAAJServlet (e.g. com.sun.xml.messaging.soap.server.SAAJServlet (from saaj-coms.jar), org.jboss.jaxr.servlet.SAAJServlet,ora.jwsnut.saaj.SAAJServlet) or something entirely homebrewed.
Eddy Lee Sin Ti
Ranch Hand

Joined: Oct 06, 2005
Posts: 135
J2EE 1.4 supports only WS-I Basic Profile 1.0. I understand that technology is always evolving. Ya, we all live in it.

More important is that how well understood and widely accepted is the "old" or i called it mature specification be. Vendor tools also another aspect that determine the acceptance of a specification.

Just my humble opinion.
JuanP barbancho
Ranch Hand

Joined: Oct 25, 2005
Posts: 52
Congratulations,



I call the SOAP servlet, I understand the XSD (xml satanic definition) .

Thank for your replys
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Problem with SOAP
 
Similar Threads
General XML problem with namespaces
problem with WSDL2Java and nested complex types
Exception while deploying webservice on jboss 4.2.1 using jax-ws
weblogic home page sample request not generated
XSD problem