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 "Shao, Zhiren" <Zh...@travelex.com.au> on 2008/10/21 02:03:54 UTC
How to validate out going SOAP with Axis2?
Hi,
I'm using Axis2 to consume web service from another company. In WSDL I
have a type which should be no more than 40 characters, here's the
definition:
<xs:simpleType name="Name_Type">
<xs:restriction base="xs:string">
<xs:maxLength value="40"/>
</xs:restriction>
</xs:simpleType>
However, Axis2 allow me to construct a SOAP with morn than 40 chars and
send out. Is there a way to configure Axis2 so it validates the soap
before sending out?
Thanks a lot.
Ren
This e-mail message (including any attachments) is private, intended solely for the recipient(s) or entity to whom it
is addressed and may contain material which is confidential and privileged. No one other than the named recipient(s)
may read, copy, rely on, redirect, save or alter any part of this message or attachment(s) in any way. The views,
opinions and information expressed in this message represent those of the individual sender and do not reflect the
views of the Travelex Group. Please take notice that the employees and/or agents of the Travelex Group are not
authorized to make corporate commitments or representations via e-mail and no statement or representation made in this
e-mail is binding upon the Travelex Group. While reasonable effort has been made to ensure this message (including any
attachments) is free of viruses, opening and using this message (including any attachments) is at the risk of the
recipient(s). The Travelex Group consists of Travelex Limited, Ruesch International, Inc. and any subsidiaries,
affiliates or related entities. Travelex can be found on the World Wide Web at www.travelex.com. Ruesch can be found
on the World Wide Web at www.ruesch.com.
Re: How to validate out going SOAP with Axis2?
Posted by keith chapman <ke...@gmail.com>.
There is no such API method. Are you using Service Client or using a
generated stub (as your client)? If you are using a stub the stub might so
this validation for you.
Thanks,
Keith.
On Tue, Oct 21, 2008 at 7:51 AM, Shao, Zhiren
<Zh...@travelex.com.au>wrote:
> Hi Martin,
>
> Thanks for your response. It's a good idea to make a client side validator.
> However, do you know if there's any supporting API from axis2? How to
> validate a SOAP message in AXIS2?
>
>
>
> Regards,
>
> Ren
> ------------------------------
>
> *From:* Martin Gainty [mailto:mgainty@hotmail.com]
> *Sent:* Tuesday, 21 October 2008 11:52 AM
> *To:* axis-user@ws.apache.org
> *Subject:* RE: How to validate out going SOAP with Axis2?
>
>
>
> the easiest answer would be to construct a validator on the client-side
> so lets say you have a JS validator function in your browser such as
> <html>
> <head>
> <SCRIPT LANGUAGE="JavaScript">
> var submitcount=0;
> function submitForm(var Name_Type)
> {
> if (Name_Type.length() > 40)
> {
> alert("String must be < = 40 characters");
> document.login_form.Name_Type.focus();
> return true;
> }
> //normal functionality..will post to the webservice populated in url
> document.login_form.action=url;
> document.login_form.submit();
> }
> </script>
> </head>
>
> majority of validator functions such as Business Logic, DB and or any
> resource-based validators would be located on WS
> does this help?
> Martin
> ______________________________________________
> Disclaimer and confidentiality note
> Everything in this e-mail and any attachments relates to the official
> business of Sender. This transmission is of a confidential nature and Sender
> does not endorse distribution to any party other than intended recipient.
> Sender does not necessarily endorse content contained within this
> transmission.
>
> ------------------------------
>
> Subject: How to validate out going SOAP with Axis2?
> Date: Tue, 21 Oct 2008 11:03:54 +1100
> From: Zhiren.Shao@travelex.com.au
> To: axis-user@ws.apache.org
>
> Hi,
>
> I'm using Axis2 to consume web service from another company. In WSDL I have
> a type which should be no more than 40 characters, here's the definition:
>
> <xs:simpleType name="Name_Type">
>
> <xs:restriction base="xs:string">
>
> <xs:maxLength value="40"/>
>
> </xs:restriction>
>
> </xs:simpleType>
>
>
>
> However, Axis2 allow me to construct a SOAP with morn than 40 chars and
> send out. Is there a way to configure Axis2 so it validates the soap before
> sending out?
>
>
>
> Thanks a lot.
>
> Ren
>
>
>
>
>
>
> This e-mail message (including any attachments) is private, intended solely for the recipient(s) or entity to whom it
>
> is addressed and may contain material which is confidential and privileged. No one other than the named recipient(s)
>
> may read, copy, rely on, redirect, save or alter any part of this message or attachment(s) in any way. The views,
>
> opinions and information expressed in this message represent those of the individual sender and do not reflect the
>
> views of the Travelex Group. Please take notice that the employees and/or agents of the Travelex Group are not
>
> authorized to make corporate commitments or representations via e-mail and no statement or representation made in this
>
> e-mail is binding upon the Travelex Group. While reasonable effort has been made to ensure this message (including any
>
> attachments) is free of viruses, opening and using this message (including any attachments) is at the risk of the
>
> recipient(s). The Travelex Group consists of Travelex Limited, Ruesch International, Inc. and any subsidiaries,
>
> affiliates or related entities. Travelex can be found on the World Wide Web at
> www.travelex.com. Ruesch can be found
> on the World Wide Web at www.ruesch.com.
>
>
> ------------------------------
>
> Store, manage and share up to 5GB with Windows Live SkyDrive. Start
> uploading now<http://skydrive.live.com/welcome.aspx?provision=1?ocid=TXT_TAGLM_WL_skydrive_102008>
>
>
>
>
>
> This e-mail message (including any attachments) is private, intended solely for the recipient(s) or entity to whom it
>
> is addressed and may contain material which is confidential and privileged. No one other than the named recipient(s)
>
> may read, copy, rely on, redirect, save or alter any part of this message or attachment(s) in any way. The views,
>
> opinions and information expressed in this message represent those of the individual sender and do not reflect the
>
> views of the Travelex Group. Please take notice that the employees and/or agents of the Travelex Group are not
>
> authorized to make corporate commitments or representations via e-mail and no statement or representation made in this
>
> e-mail is binding upon the Travelex Group. While reasonable effort has been made to ensure this message (including any
>
> attachments) is free of viruses, opening and using this message (including any attachments) is at the risk of the
>
> recipient(s). The Travelex Group consists of Travelex Limited, Ruesch International, Inc. and any subsidiaries,
>
> affiliates or related entities. Travelex can be found on the World Wide Web at
> www.travelex.com. Ruesch can be found
> on the World Wide Web at www.ruesch.com.
>
--
Keith Chapman
Senior Software Engineer
WSO2 Inc.
Oxygenating the Web Service Platform.
http://wso2.org/
blog: http://www.keith-chapman.org
RE: How to validate out going SOAP with Axis2?
Posted by "Shao, Zhiren" <Zh...@travelex.com.au>.
Hi Martin,
Thanks for your response. It's a good idea to make a client side
validator. However, do you know if there's any supporting API from
axis2? How to validate a SOAP message in AXIS2?
Regards,
Ren
________________________________
From: Martin Gainty [mailto:mgainty@hotmail.com]
Sent: Tuesday, 21 October 2008 11:52 AM
To: axis-user@ws.apache.org
Subject: RE: How to validate out going SOAP with Axis2?
the easiest answer would be to construct a validator on the client-side
so lets say you have a JS validator function in your browser such as
<html>
<head>
<SCRIPT LANGUAGE="JavaScript">
var submitcount=0;
function submitForm(var Name_Type)
{
if (Name_Type.length() > 40)
{
alert("String must be < = 40 characters");
document.login_form.Name_Type.focus();
return true;
}
//normal functionality..will post to the webservice populated in url
document.login_form.action=url;
document.login_form.submit();
}
</script>
</head>
majority of validator functions such as Business Logic, DB and or any
resource-based validators would be located on WS
does this help?
Martin
______________________________________________
Disclaimer and confidentiality note
Everything in this e-mail and any attachments relates to the official
business of Sender. This transmission is of a confidential nature and
Sender does not endorse distribution to any party other than intended
recipient. Sender does not necessarily endorse content contained within
this transmission.
________________________________
Subject: How to validate out going SOAP with Axis2?
Date: Tue, 21 Oct 2008 11:03:54 +1100
From: Zhiren.Shao@travelex.com.au
To: axis-user@ws.apache.org
Hi,
I'm using Axis2 to consume web service from another company. In WSDL I
have a type which should be no more than 40 characters, here's the
definition:
<xs:simpleType name="Name_Type">
<xs:restriction base="xs:string">
<xs:maxLength value="40"/>
</xs:restriction>
</xs:simpleType>
However, Axis2 allow me to construct a SOAP with morn than 40 chars and
send out. Is there a way to configure Axis2 so it validates the soap
before sending out?
Thanks a lot.
Ren
This e-mail message (including any attachments) is private, intended
solely for the recipient(s) or entity to whom it
is addressed and may contain material which is confidential and
privileged. No one other than the named recipient(s)
may read, copy, rely on, redirect, save or alter any part of this
message or attachment(s) in any way. The views,
opinions and information expressed in this message represent those of
the individual sender and do not reflect the
views of the Travelex Group. Please take notice that the employees
and/or agents of the Travelex Group are not
authorized to make corporate commitments or representations via e-mail
and no statement or representation made in this
e-mail is binding upon the Travelex Group. While reasonable effort has
been made to ensure this message (including any
attachments) is free of viruses, opening and using this message
(including any attachments) is at the risk of the
recipient(s). The Travelex Group consists of Travelex Limited, Ruesch
International, Inc. and any subsidiaries,
affiliates or related entities. Travelex can be found on the World Wide
Web at www.travelex.com. Ruesch can be found
on the World Wide Web at www.ruesch.com.
________________________________
Store, manage and share up to 5GB with Windows Live SkyDrive. Start
uploading now
<http://skydrive.live.com/welcome.aspx?provision=1?ocid=TXT_TAGLM_WL_sky
drive_102008>
This e-mail message (including any attachments) is private, intended solely for the recipient(s) or entity to whom it
is addressed and may contain material which is confidential and privileged. No one other than the named recipient(s)
may read, copy, rely on, redirect, save or alter any part of this message or attachment(s) in any way. The views,
opinions and information expressed in this message represent those of the individual sender and do not reflect the
views of the Travelex Group. Please take notice that the employees and/or agents of the Travelex Group are not
authorized to make corporate commitments or representations via e-mail and no statement or representation made in this
e-mail is binding upon the Travelex Group. While reasonable effort has been made to ensure this message (including any
attachments) is free of viruses, opening and using this message (including any attachments) is at the risk of the
recipient(s). The Travelex Group consists of Travelex Limited, Ruesch International, Inc. and any subsidiaries,
affiliates or related entities. Travelex can be found on the World Wide Web at www.travelex.com. Ruesch can be found
on the World Wide Web at www.ruesch.com.
RE: How to validate out going SOAP with Axis2?
Posted by Martin Gainty <mg...@hotmail.com>.
the easiest answer would be to construct a validator on the client-side
so lets say you have a JS validator function in your browser such as
<html>
<head>
<SCRIPT LANGUAGE="JavaScript">
var submitcount=0;
function submitForm(var Name_Type)
{
if (Name_Type.length() > 40)
{
alert("String must be < = 40 characters");
document.login_form.Name_Type.focus();
return true;
}
//normal functionality..will post to the webservice populated in url
document.login_form.action=url;
document.login_form.submit();
}
</script>
</head>
majority of validator functions such as Business Logic, DB and or any resource-based validators would be located on WS
does this help?
Martin
______________________________________________
Disclaimer and confidentiality note
Everything in this e-mail and any attachments relates to the official business of Sender. This transmission is of a confidential nature and Sender does not endorse distribution to any party other than intended recipient. Sender does not necessarily endorse content contained within this transmission.
Subject: How to validate out going SOAP with Axis2?
Date: Tue, 21 Oct 2008 11:03:54 +1100
From: Zhiren.Shao@travelex.com.au
To: axis-user@ws.apache.org
Hi,
I’m using Axis2 to consume web service from another
company. In WSDL I have a type which should be no more than 40 characters, here’s
the definition:
<xs:simpleType name="Name_Type">
<xs:restriction
base="xs:string">
<xs:maxLength
value="40"/>
</xs:restriction>
</xs:simpleType>
However, Axis2 allow me to construct a SOAP with morn than
40 chars and send out. Is there a way to configure Axis2 so it validates the
soap before sending out?
Thanks a lot.
Ren
This e-mail message (including any attachments) is private, intended solely for the recipient(s) or entity to whom it
is addressed and may contain material which is confidential and privileged. No one other than the named recipient(s)
may read, copy, rely on, redirect, save or alter any part of this message or attachment(s) in any way. The views,
opinions and information expressed in this message represent those of the individual sender and do not reflect the
views of the Travelex Group. Please take notice that the employees and/or agents of the Travelex Group are not
authorized to make corporate commitments or representations via e-mail and no statement or representation made in this
e-mail is binding upon the Travelex Group. While reasonable effort has been made to ensure this message (including any
attachments) is free of viruses, opening and using this message (including any attachments) is at the risk of the
recipient(s). The Travelex Group consists of Travelex Limited, Ruesch International, Inc. and any subsidiaries,
affiliates or related entities. Travelex can be found on the World Wide Web at www.travelex.com. Ruesch can be found
on the World Wide Web at www.ruesch.com.
_________________________________________________________________
Store, manage and share up to 5GB with Windows Live SkyDrive.
http://skydrive.live.com/welcome.aspx?provision=1?ocid=TXT_TAGLM_WL_skydrive_102008