axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Zhang zhongliang" <>
Subject Re:Re: Re: axis2:how to validate soap message against wsdl?
Date Tue, 21 Aug 2007 03:32:42 GMT
Thanks a lot.
I just do not want to use the wsdl2java tool to generate code for me.For I use axis2 to develop
commercial project,so I need to obey some rules,for example,the code conventions that the
customer provided.
For example,I have a piece of code from wsdl:types like this:
<xsd:element name="CertSummaryRequest">
			<xsd:element name="Name" type="xsd:string" />
			<xsd:element name="Email" type="xsd:string" />
It is a kind of search,by name or email,So I them to a xsd file,named CertSummarySearch.xsd,then
I use the xsd to validate soap message's payload part,for example,the following message is
<tns:CertSummaryRequest xmlns:tns="http://example/">
and if the following message is invalid,because of it contains Name and Email elements at
the same time:
<tns:CertSummaryRequest xmlns:tns="http://example/">

That works for me,but I need to use the Schema,Validator class and related.
thanks for your help.

在2007-08-21,"Amila Suriarachchi" <> 写道:

There is no such a property. becuase to valide an soap message against a the schema it should
complie the schema and do it accordling.

But if you have problems in understanding the ADB generated code. I can help you for that.


On 8/21/07, Zhang zhongliang <> wrote: 
First of all,thanks for your advice.
Do you mean use ADB data binding,but if I use the wsdl2java tool to generate code,it will
generate too much code lines,and which are not easy to understand,also the method of naming
variables and methods. 
What I need is keeping the program simple,so I wonder whether there is a way to set a property
in the configuration file,which will enable the axis2 to validate the soap message(payload
part) against wsdl for me.For example,if I put the following part:<parameter name="useOriginalwsdl"
locked="false">true</parameter> in the services.xml in META-INF folder,then when
I want to view the wsdl file,then I will view my own wsdl,not the one that axis2 generates
So,Is there any properties that I can just configure in the configuration file( axis2.xml,services.xml)
to get what I wanted?
Thanks a lot.

在2007-08-21,"Amila Suriarachchi" <> 写道: 

Is there any reason to deal with the OMElement directly?

if you generate the data bind code for wsdl using ADB then when the request parsing time ADB
validates the request and give you the object structure. 

you can use tool to generate ADB code.


On 8/21/07, Zhang zhongliang <> wrote: 
Hi,I am the beginner to use this mailing list,so,any mistakes that I made,I hope I can be
I have a problem when I using apache-axis2-1.1.1,the web service my team developed will be
accessed by other client,although we provided the wsdl to the client,but errors may also exist
with the format of the soap message. 
I choose the wsdl:types elements out and form the xsd schema file(.xsd),and then use it to
validate the soap message(Which is an OMElement object).
Now I want to ask whether there is a flag that I can configure to make axis2 validate the
soap message against wsdl for me automatically? 
Thanks so much!

全 国 万 名 职 场 女 性,齐 聚 非 常 美 女,惊 艳 2 0 0 7 

Amila Suriarachchi,
WSO2 Inc. 

网 易 邮 箱 夏 日 大 变 脸,带 你 感 受 新 一 代 邮 箱 的 全
新 魅 力 >> 

Amila Suriarachchi,
WSO2 Inc.
View raw message