The latest version of JiBX (1.2, currently in beta test and soon to be
production released) supports code generation from schema, and you'd
easily be able to eliminate this element in that code generation. But
WSDL2Java is separate, and to eliminate the parameter from the generated
web services interface output from WSDL2Java you'd need to actually edit
the WSDL to remove the references to TrustedUserHeader. (you don't show
the actual operation and message definitions from the WSDL, but I assume
the references are there - otherwise you wouldn't see this showing up in
the method call interfaces).
So your best approach is probably to just edit the WSDL and eliminate
the reference to TrustedUserHeader from the messages components of the
WSDL. Once you've done that, it should be dropped from the method call
interfaces.
- Dennis
amit shah wrote:
The reason I want to skip it is because, as the class gets generated
each web service call (method) takes an instance of this class as a
parameter, which I don't want.
Can this be done by using JiBX ? (i.e. skip the generation which I
think will automatically make the service calls not take an instance
of the skipped class as a parameter. Please correct me if I am wrong).
If yes then can you please provide me some guidance on what should the
binding definition file include i.e which tags? On a first look
(http://jibx.sourceforge.net/tutorial/binding-tutorial.html) I was not
able to figure out the xml tags for this particular scenario.
I know there is some way to skip these classes as they are not their
in the production environment but I don't know how.
On Sun, Mar 1, 2009 at 2:56 AM, Dennis Sosnoski <[email protected]
<mailto:[email protected]>> wrote:
Hi Amit,
Why do you want to skip generating the element? You could do this
using JiBX, but any XML documents you generated without this
element would be invalid (since the schema says it's a required
element).
- Dennis
Dennis M. Sosnoski
SOA and Web Services in Java
Training and Consulting
http://www.sosnoski.com <http://www.sosnoski.com/> -
http://www.sosnoski.co.nz <http://www.sosnoski.co.nz/>
Seattle, WA +1-425-939-0576 - Wellington, NZ +64-4-298-6117
amit shah wrote:
Could using jibx data binding option help in this scenario
(Skipping some class generations) ?
On Thu, Feb 26, 2009 at 4:39 PM, amit shah <[email protected]
<mailto:[email protected]> <mailto:[email protected]
<mailto:[email protected]>>> wrote:
Re-replying to the mail in case I was not clear in
explaining the
problem.
I want to generate java classes from a published wsdl file
(exposed by Microsoft SQL Reporting Services 2008). During the
class generation, I want to skip some of these classes (for e.g
TrustedUserHeader).
Pasting a snippet of the wsdl file.
_________________________________________________________________
<wsdl:types>
<s:schema elementFormDefault="qualified"
targetNamespace="http://schemas.microsoft.com/sqlserver/2005/06/30/reporting/reportingservices">
<s:element name="ListSecureMethods">
<s:complexType />
</s:element>
<s:element name="ListSecureMethodsResponse">
<s:complexType>
<s:sequence>
<s:element minOccurs="0" maxOccurs="1"
name="ListSecureMethodsResult" type="tns:ArrayOfString" />
</s:sequence>
</s:complexType>
</s:element>
<s:complexType name="ArrayOfString">
<s:sequence>
<s:element minOccurs="0" maxOccurs="unbounded"
name="string"
nillable="true" type="s:string" />
</s:sequence>
</s:complexType>
*<s:element name="TrustedUserHeader"
type="tns:TrustedUserHeader" /> *
** * </s:element>*
......
......
</wsdl:types>
_________________________________________________________________
Are there any ways (may be a command option) of using
wsdl2java.bat which would skip the generation of
*TrustedUserHeader *class?
Thanks in advance,
Amit Shah.
On 2/17/09, *amit shah* <[email protected]
<mailto:[email protected]>
<mailto:[email protected] <mailto:[email protected]>>> wrote:
Hi,
I am using axis2 1.4.1 to generate java classes
from a
wsdl file. The
web services are exposed by the SQL Server 2008 Reporting
Services. I
wanted to know if there is any command line option
while using
wsdl2java.bat to skip generating some classes (In my
case a soap
header called TrustedUserHeader). I use the following
command to
convert wsdl to java
wsdl2java.bat -o E:\wsdl2java\ -p
sqlserver.reporting.reportingexecutionservices -ss -g -ns2p
http://schemas.microsoft.com/sqlserver/2005/06/30/reporting/reportingservices=sqlserver.reporting.reportingexecutionservices
-uri http://v-sql-2k8/reportserver/ReportExecution2005.asmx
I want to skip generation of the TrustedUserHeader
class. If anyone
can provide any guidance it would be very helpful
Note : The wsdl file has the same namespace for all the
classes. Hence
the namespace of the TrustedUserHeader class is also
http://schemas.microsoft.com/sqlserver/2005/06/30/reporting/reportingservices.
Thanks in advance,
Amit Shah.