You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by Ken Tam <ke...@proteustech.com> on 2006/05/22 03:18:08 UTC

Schema validation

Hi all,

I am consuming web services made available from my customer. I was given a
very elaborate WSDL with schemas and I was able to generate the stubs by
using Axis's WSDL2Java. Everything was working fine until the service was
changed on the customer's end. This causes the deserialization step to fail
as the SOAP response does not match the schema. The customer in this case is
a big company and they don't tend to respond in a timely manner. However,
the problem persists which I must fix. I am using Axis 1.3 and it doesn't
seem to validate the SOAP response with the WSDL's schema. How do I
configure Axis to do so? Currently, I had to spend quite a bit of time to
track down the mismatches. I figure if the schema is used to validate, it
should point out the mismatches right off to spare me the time to track them
down.

Thanks,
Ken



---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org


Re: Schema validation

Posted by Dies Koper <di...@jp.fujitsu.com>.
Hello Ken,

Axis does not have the functionality to validate the SOAP message.
You should look for a third-party tool (hopefully others in the group 
have suggestions) to do that or write one yourself.

Good luck,
Dies

Ken Tam wrote:
> Hi all,
> 
> I am consuming web services made available from my customer. I was given a
> very elaborate WSDL with schemas and I was able to generate the stubs by
> using Axis's WSDL2Java. Everything was working fine until the service was
> changed on the customer's end. This causes the deserialization step to fail
> as the SOAP response does not match the schema. The customer in this case is
> a big company and they don't tend to respond in a timely manner. However,
> the problem persists which I must fix. I am using Axis 1.3 and it doesn't
> seem to validate the SOAP response with the WSDL's schema. How do I
> configure Axis to do so? Currently, I had to spend quite a bit of time to
> track down the mismatches. I figure if the schema is used to validate, it
> should point out the mismatches right off to spare me the time to track them
> down.
> 
> Thanks,
> Ken


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org


RE: Schema validation

Posted by Ken Tam <ke...@proteustech.com>.
Hi Anne and Martin,

Thank you both for your responses. I already tried to obtain the latest WSDL
but it wasn't available. I'll try the handler method.

Ken
  -----Original Message-----
  From: Anne Thomas Manes [mailto:atmanes@gmail.com]
  Sent: Monday, May 22, 2006 5:26 AM
  To: axis-user@ws.apache.org
  Subject: Re: Schema validation


  Ken,

  I agree with Martin -- your service provider should supply you with a new
WSDL. Have you tried just doing a GET on the service URL appended with
"?wsdl"?.

  In the meantime, you can use a handler to validate the message. Java
provides native support for validation in the javax.xml.validation package.

  Anne


  On 5/22/06, Martin Gainty <mg...@hotmail.com> wrote:
    Good Morning Ken

    Who(m)ever is supplying the WSDL to you is responsible for specifying
request and response for all methods along with specifying
    parameters to those methods.
    Who(m)ever is changing the schema needs to re-gen and re-publish the
WSDL

    A situation arose where my webservice is now returning a String
parameter so I have re-published and regen'ed the WSDL to reflect the
response string

    <wsdl:message name="NameOfMethodResponse">
          <wsdl:part name="NameOfMethodReturn" type="xsd:string" />
        </wsdl:message>

    Does this answer your question?
    Martin --
    *********************************************************************
    This email message and any files transmitted with it contain
confidential
    information intended only for the person(s) to whom this email message
is
    addressed.  If you have received this email message in error, please
notify
    the sender immediately by telephone or email and destroy the original
    message without making a copy.  Thank you.



    ----- Original Message -----
    From: "Ken Tam" < kentam@proteustech.com>
    To: <ax...@ws.apache.org>
    Sent: Sunday, May 21, 2006 9:18 PM
    Subject: Schema validation


    > Hi all,
    >
    > I am consuming web services made available from my customer. I was
given a
    > very elaborate WSDL with schemas and I was able to generate the stubs
by
    > using Axis's WSDL2Java. Everything was working fine until the service
was
    > changed on the customer's end. This causes the deserialization step to
fail
    > as the SOAP response does not match the schema. The customer in this
case is
    > a big company and they don't tend to respond in a timely manner.
However,
    > the problem persists which I must fix. I am using Axis 1.3 and it
doesn't
    > seem to validate the SOAP response with the WSDL's schema. How do I
    > configure Axis to do so? Currently, I had to spend quite a bit of time
to
    > track down the mismatches. I figure if the schema is used to validate,
it
    > should point out the mismatches right off to spare me the time to
track them
    > down.
    >
    > Thanks,
    > Ken
    >
    >
    >
    > ---------------------------------------------------------------------
    > To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
    > For additional commands, e-mail: axis-user-help@ws.apache.org
    >
    >


Re: Schema validation

Posted by Anne Thomas Manes <at...@gmail.com>.
Ken,

I agree with Martin -- your service provider should supply you with a new
WSDL. Have you tried just doing a GET on the service URL appended with
"?wsdl"?.

In the meantime, you can use a handler to validate the message. Java
provides native support for validation in the javax.xml.validation package.

Anne

On 5/22/06, Martin Gainty <mg...@hotmail.com> wrote:
>
> Good Morning Ken
>
> Who(m)ever is supplying the WSDL to you is responsible for specifying
> request and response for all methods along with specifying
> parameters to those methods.
> Who(m)ever is changing the schema needs to re-gen and re-publish the WSDL
>
> A situation arose where my webservice is now returning a String parameter
> so I have re-published and regen'ed the WSDL to reflect the response string
>
> <wsdl:message name="NameOfMethodResponse">
>       <wsdl:part name="NameOfMethodReturn" type="xsd:string" />
>     </wsdl:message>
>
> Does this answer your question?
> Martin --
> *********************************************************************
> This email message and any files transmitted with it contain confidential
> information intended only for the person(s) to whom this email message is
> addressed.  If you have received this email message in error, please
> notify
> the sender immediately by telephone or email and destroy the original
> message without making a copy.  Thank you.
>
>
>
> ----- Original Message -----
> From: "Ken Tam" <ke...@proteustech.com>
> To: <ax...@ws.apache.org>
> Sent: Sunday, May 21, 2006 9:18 PM
> Subject: Schema validation
>
>
> > Hi all,
> >
> > I am consuming web services made available from my customer. I was given
> a
> > very elaborate WSDL with schemas and I was able to generate the stubs by
> > using Axis's WSDL2Java. Everything was working fine until the service
> was
> > changed on the customer's end. This causes the deserialization step to
> fail
> > as the SOAP response does not match the schema. The customer in this
> case is
> > a big company and they don't tend to respond in a timely manner.
> However,
> > the problem persists which I must fix. I am using Axis 1.3 and it
> doesn't
> > seem to validate the SOAP response with the WSDL's schema. How do I
> > configure Axis to do so? Currently, I had to spend quite a bit of time
> to
> > track down the mismatches. I figure if the schema is used to validate,
> it
> > should point out the mismatches right off to spare me the time to track
> them
> > down.
> >
> > Thanks,
> > Ken
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> > For additional commands, e-mail: axis-user-help@ws.apache.org
> >
> >

Re: Schema validation

Posted by Martin Gainty <mg...@hotmail.com>.
Good Morning Ken

Who(m)ever is supplying the WSDL to you is responsible for specifying request and response for all methods along with specifying 
parameters to those methods.
Who(m)ever is changing the schema needs to re-gen and re-publish the WSDL 

A situation arose where my webservice is now returning a String parameter so I have re-published and regen'ed the WSDL to reflect the response string

<wsdl:message name="NameOfMethodResponse">
      <wsdl:part name="NameOfMethodReturn" type="xsd:string" /> 
    </wsdl:message>

Does this answer your question?
Martin --
*********************************************************************
This email message and any files transmitted with it contain confidential
information intended only for the person(s) to whom this email message is
addressed.  If you have received this email message in error, please notify
the sender immediately by telephone or email and destroy the original
message without making a copy.  Thank you.



----- Original Message ----- 
From: "Ken Tam" <ke...@proteustech.com>
To: <ax...@ws.apache.org>
Sent: Sunday, May 21, 2006 9:18 PM
Subject: Schema validation


> Hi all,
> 
> I am consuming web services made available from my customer. I was given a
> very elaborate WSDL with schemas and I was able to generate the stubs by
> using Axis's WSDL2Java. Everything was working fine until the service was
> changed on the customer's end. This causes the deserialization step to fail
> as the SOAP response does not match the schema. The customer in this case is
> a big company and they don't tend to respond in a timely manner. However,
> the problem persists which I must fix. I am using Axis 1.3 and it doesn't
> seem to validate the SOAP response with the WSDL's schema. How do I
> configure Axis to do so? Currently, I had to spend quite a bit of time to
> track down the mismatches. I figure if the schema is used to validate, it
> should point out the mismatches right off to spare me the time to track them
> down.
> 
> Thanks,
> Ken
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
> 
>