AXIS: WSDL2Java generated javabean is different
I have a javabean in the following format:
public MyBean{
private String name ;
public MyBean(){
public MyBean(String name){
this.name = name ;
public String getName(){
return name ;
public void setName(String name){
this.name = name ;
This bean is used by my axis service. It can be created by the server and sent as a return type to my service call and used fine by the client.
I then decided to write a service that took this bean type as an input parameter. Ran Java2WSDL to generate the WSDL, then ran WSDL2Java to get the required client side code. I wrote the client and the compile failed when I attempted to use the argument based constructor. Looking at the generated code I noticed that the generated class for the bean didn't have such a constructor and only had the default constructor.
I know that the bean must have a default constructor to satisfy the requirements for a javabean, but I don't know why the other constructor is missing from the generated code.
Is this a bug or because an argument based constructor isn't allowed in a javabean?
Thanks in advance
Chris
Hello Chris,
I am also facing the same problem. The Javabean constructed after I ran my <axis-wsdl2java> is different. In my javabean I have a multi-argument constructor apart from the default constructor, and every time I generated the java bindings, the order in the multi-argument constructor changes.
How to fix this problem of constantly changing the constructor. I need to use this multi-argument constructor in my other Java classes.
Anybody please let us know how to ensure that the constructors generated by the <axis-wsdl2java> task will be constant all the time with one-to-one matching of the javabean I provide.
Regards
Shekar
Similar Messages
-
URGENT: Problem generating Client of BPEL process using Axis WSDL2Java
Hi,
I have a BPEL process running fine using BPEL console.
Now I want to create a Java client to invoke it.
I try to generate the stub using axis WSDL2Java.
But i can't generate it. I got the problem
{http://schemas.xmlsoap.org/ws/2004/08/addressing}Action already exists
java.io.IOException: Type {http://car.webservices}CarRentalResult is referenced
but not defined.
at org.apache.axis.wsdl.symbolTable.SymbolTable.checkForUndefined(Symbol
Table.java:665)
at org.apache.axis.wsdl.symbolTable.SymbolTable.add(SymbolTable.java:545
at org.apache.axis.wsdl.symbolTable.SymbolTable.populate(SymbolTable.jav
a:518)
at org.apache.axis.wsdl.symbolTable.SymbolTable.populate(SymbolTable.jav
a:495)
at org.apache.axis.wsdl.gen.Parser$WSDLRunnable.run(Parser.java:361)
at java.lang.Thread.run(Unknown Source)
I have used some complexType of the web services in my BPEL process.
I guess the parser can't resolve where it is...is it?
I wonder what I should do to make the parser know where to find that type.
Do I have to specify anything more in my BPEL process?
Here is the WSDL of my BPEL process
<?xml version="1.0" encoding="UTF-8"?>
<definitions
name="TravelPlanner"
targetNamespace="http://travelplanner.bpel"
xmlns="http://schemas.xmlsoap.org/wsdl/"
xmlns:tns="http://travelplanner.bpel"
xmlns:car="http://car.webservices"
xmlns:plnk="http://schemas.xmlsoap.org/ws/2003/05/partner-link/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:hotel="http://hotel.webservices"
xmlns:flight="http://flight.webservices"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:bill="http://bill"
>
<types>
<schema attributeFormDefault="unqualified" elementFormDefault="qualified" targetNamespace="http://travelplanner.bpel"
xmlns="http://www.w3.org/2001/XMLSchema">
<import namespace="http://bill"/>
<import location="http://localhost:8080/axis/services/CarRentalService?wsdl" namespace="http://car.webservices"/>
<import location="http://localhost:8080/axis/services/HotelBookingService?wsdl"
namespace="http://hotel.webservices"/>
<import location="http://localhost:8080/axis/services/FlightBookingService?wsdl"
namespace="http://flight.webservices"/>
<element name="Hotel" type="hotel:Hotel"/>
<element name="HotelBookingResult" type="hotel:HotelBookingResult"/>
<element name="Vehicle" type="car:Vehicle"/>
<element name="CarRentalResult" type="car:CarRentalResult"/>
<element name="Flight" type="flight:Flight"/>
<element name="FlightBookingResult" type="flight:FlightBookingResult"/>
<element name="TravelPlannerRequest">
<complexType>
<sequence>
<element name="from_airport" type="string"/>
<element name="to_airport" type="string"/>
<element name="travel_city" type="string"/>
<element name="travel_country" type="string"/>
<element name="leave_date" type="dateTime"/>
<element name="return_date" type="dateTime"/>
<element name="no_of_traveler" type="int"/>
<element name="traveler_firstname" type="flight:ArrayOf_xsd_string"/>
<element name="traveler_lastname" type="flight:ArrayOf_xsd_string"/>
<element name="billingInfo" type="bill:Bill"/>
<element name="flightEndpointURI" type="string"/>
<element name="hotelEndpointURI" type="string"/>
<element name="carEndpointURI" type="string"/>
</sequence>
</complexType>
</element>
<element name="TravelPlannerResponse">
<complexType>
<sequence>
<element name="flight_go" type="flight:Flight"/>
<element name="flight_back" type="flight:Flight"/>
<element name="hotel" type="hotel:Hotel"/>
<element name="car" type="car:Vehicle"/>
<element name="paymentInfo" type="bill:Bill"/>
<element name="charged_amount" type="float"/>
</sequence>
</complexType>
</element>
</schema>
<xsd:schema xmlns="http://www.w3.org/2000/10/XMLSchema">
<xsd:import namespace="http://schemas.xmlsoap.org/ws/2004/08/addressing" schemaLocation="http://schemas.xmlsoap.org/ws/2004/08/addressing"/>
</xsd:schema>
</types>
<message name="TravelPlannerResponseMessage">
<part name="payload" element="tns:TravelPlannerResponse"/>
</message>
<message name="TravelPlannerRequestMessage">
<part name="payload" element="tns:TravelPlannerRequest"/>
</message>
<portType name="TravelPlanner">
<operation name="process">
<input message="tns:TravelPlannerRequestMessage"/>
<output message="tns:TravelPlannerResponseMessage"/>
</operation>
</portType>
<binding name="TravelPlannerBinding" type="tns:TravelPlanner">
<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
<operation name="process">
<soap:operation style="document" soapAction="process"/>
<input>
<soap:body use="literal"/>
</input>
<output>
<soap:body use="literal"/>
</output>
</operation>
</binding>
<service name="TravelPlanner">
<port name="TravelPlannerPort" binding="tns:TravelPlannerBinding">
<soap:address location="http://angel:9700/orabpel/default/TravelPlanner/1.0"/>
</port>
</service>
<plnk:partnerLinkType name="TravelPlanner">
<plnk:role name="TravelPlannerProvider">
<plnk:portType name="tns:TravelPlanner"/>
</plnk:role>
</plnk:partnerLinkType>
</definitions>
Could somebody help me?i got it worked out. sorry.
just forgot to import wsdl files. -
Weblogic 9.2 and axis-wsdl2java issue
Hi
I have been using axis-wsdl2java task to generate stub classes to access a websevice from another server.I could get the response successfully with WL 8.1.
But I am using the same generated classes (infact I generated it using new weblogic.jar of WL9.2)
The classes got generated .
But when I used it in my application I was not getting the required response from the external webservice.
Is the generated classes from axis-wsdl2java will not work with WL9.2 ?
Please let me know your thoughts
Thanks,
BinuI tried a workaround to solve this issue by putting the xalan.jar from ant lib folder in class path.
Now I am able to use the same generated classes to invoke webservice -
System generated Index names different on target database after expdp/impdp
After performing expdp/impdp to move data from one database (A) to another (B), the system name generated indexes has different names on the target database, which caused a major issue with GoldenGate. Could anyone provide any tricks on how to perform the expdp/impdp and have the same system index name generated to be the same on both source and target?
Thanks in advance.
JLWhile I do not agree with Sb choice of wording his solution is correct. I suggest you drop and recreate the objects using explicit naming then you will get the same names on the target database after import for constraints, indexes, and FK's.
A detailed description of the problem this caused with Golden Gate would be interesting. The full Oracle and Golden Gate versions is use might also be important to the solution, if one exists other than explicitl naming.
HTH -- Mark D Powell --
Edited by: Mark D Powell on May 30, 2012 12:26 PM -
How to generate 10,000 different strings?
Hi, everyone!
I want to generate 10,000 different strings. I mean they are
different from each other. The characters that is used to
form the string is a subset of ASCII. A optional requirement is
that I can assign the length of the string.
Who have efficient solutions? Have I made myself understood?
Are there some sample codes that I can refer?
regards,
GeorgeYour method is nice, but if I want to generate
random strings, what can I do? well, in case you want to generate something RANDOM, then you should use java.util.Random or Math.random()
if you want to have those strings differing from each other, then you could number them...
for example you get five random characters from your array of chars you want to use, and then add numbers from 1 to 10000 at the end of it (you may use other numbers as well, you already have some good exsamples)
or if you don't want to number your strings, then you'd have to deal with the risk that one string is generated more than once. to escape this risk you may store all these strings in an array and then check if you already have that string... if yes, then skip it... -
How to Generate 997 for different trading partner with different Interchang
How to Generate 997 for different trading partner with different InterchangIDS
We are planning to use same working “ABC -> XYZ (Host)” 850 “ecs” file even for “EFG -> XYZ (Host)” 850 Transaction. And we have successfully implemented without any issues.
We wanted to send 997 Acknowledgement in case of “EFG -> XYZ (Host)” 850 transaction.
In this case also we would like to use same “ecs” file which has been used for “XYZ (Host) -> ABC”.
After adding the 997 capabilities to Stanley I don’t see any extra capability added to “XYZ (Host)” trading partner.
The generated 997 for Stanely EDI file doesn’t reflect the “XYZ (Host)” trading partner Interchange ID. It is getting reflected the previous 997 Transaction “XYZ (Host)” Intercahnge ID.
We use following Interchange ID’s
ABC = 005381447
XYZ (Host) = 049894764
EFZ = SWEOT30013
XYZ (Host) = 5273851T
The 997 which is generated has the InterchangeID as this “049894764” instead of “5273851T”
Regards
RaviHi Ravi,
You have to have the two Delivery Channels under Host TP's communication capability. One host delivery channel should be used with one TP only and will have specific values to that TP.
Go to the Exchange Protocol Parameters of Host TP (XYZ) delivery channel (which you are using in the agreement with EFZ) and provide the required values here. Revalidate and redeploy the agreements and run a test. Let us know if you still face issue.
Regards,
Anuj -
Invoking C# WS from java axis proxy generated from the same WSDL
I am trying to transparently use the same java interface for invoking a java axis WS and a C# WS generated from the same WSDL interface.
I believe the problem may be that the .NET web service which is generated from the WSDL file, is dynamically exposing a WSDL file which is not exactly the same as the original WSDL used to generate the abstract C# class with "wsdl.exe"
When I try to invoke the C# web service with the java axis client I get the error message:
"Server did not recognize the value of HTTP Header SOAPAction: ."
Any suggestions about how to be able to use the same client interface from java, to invoke a C# web service and a java axis web service supporting (i.e. generated from) the same WSDL ?The JNI method name in the .h file is different to that in the .c file.
-
Heap dump file - Generate to a different folder
Hello,
When the AS Java iis generating the heap dump file, is it possible to generate it to a different folder rather than the standard one: /usr/sap// ?
Best regards,
Gonçalo Mouro VazHello Gonçalo
I don't think this is possible.
As per SAP Note 1004255;
On the first occurrence (only) of an OutOfMemoryError the JVM
will write a heap dump in the
/usr/sap/ directory
Can i ask why you would like it in a different folder?
Is it a space issue?
Thanks
Kenny -
Accounting document not generated because of different profit centres
Hi
In my current project billing is done by clubbing more than one sales orders
The problem we face is that if two sales order have different business areas or different profit centers accounting document is not generated
May be this is standard behavior of system
But my client prepares bill in this manner as a part of business process
Kindly suggest any setting or method to change the system behavior so that accounting document can be generated
Thanks and Regards
Sunil SrinivasanHi
This is the message I am getting
"Balancing field "Profit Center" in line item 001 not filled" -
Same BACS file number is generated for two different co cd
Hi,
We have made a BACS run on 26/06/2009 for company codes 1000, 1100,
1200, 1300, 1500, 1600, 1700, 2000, 2100 & 8000.
And we happened to notice that for company codes 1000 & 1500 the DME
file generated is same.
File path for 1000E run is /ERP/PR0/JCAPS/SCMI26/2009062612364801 &
File path for 1500E run is /ERP/PR0/JCAPS/SCMI26/2009062612364801.
Can any one let us know why has the system generated same file numbers for
2 different runs. Request you to help us to know what has caused this
problem.
Thanks and Regards
Srihari BollaHi,
ARe you using program RFFOGB_T to create the DME files? If you are storing the files in the file system (looking at the path it seems that you are) then you have to provide a specific file name for each file, else the files will be overwritten. SO create a variant for program RFFOGB_T per company code and store the specific file names in the variants. Else store the files in Temse and then use the download function where a file name can be entered prior to saving the file on your workstation. Using Temse you can also manage the DME's through transaction FDTA.
Hope this helps.
Kris -
Can we generate forms from different locations on same account?
We're thinking of subscribing for the unlimited forms plan. Would this plan allow us to generate forms (and receive reports) from various locations on the same account? Or would each location need its own account?
Thanks, MegHi Meg;
Depending on the roles each user needs to play, you could have one "Plus" membership that can have all of the "live" forms in it, that user could share forms and/or responses with the other users so they could collaborate in the editing and view responses and reports. The permissions in the form (ability to use paid features) are based on the form author, so the "Free" level users could use the paid features in these forms that were shared by the one Plus membership.
Here is some information on sharing forms: http://forums.adobe.com/docs/DOC-2462
Also some good gneral Quick Start guides and How To's: https://www.acrobat.com/formscentral/en/library/how-to-make-create-survey-or-form.html
In addition, if any of the free users were to create a form for the team they could export that form as a design file for the Plus member to import and then share. Since the free user can only create one form, but have unlimited shared with them, and since the form rights are from the author the Free user wouldn't want to share the form, but instead export it so that when the Plus user imports it they are the author and when it is shared the form would have the Plus level features (I hope that made sense).
As far as organization there are no folders in FormsCentral at this time.
Thanks,
Josh -
SQL*Developer 2.1 - Not Generating DDL for Different Users
Using SQL*Developer Version 2.1.0.63 I get an error trying to generate DDL from another user, that has access to many other schemas. It looks to me like Sql Developer is calling the DBMS_METADATA package from within other PL/SQL.
I am receiving the following error:
ORA-31603: object "ACCOUNT_TYPE_LKP" of type TABLE not found in schema "POR_OWN"
ORA-06512: at "SYS.DBMS_SYS_ERROR", line 105
ORA-06512: at "SYS.DBMS_METADATA", line 3241
ORA-06512: at "SYS.DBMS_METADATA", line 4812
ORA-06512: at line 1
I would receive these same errors in SQL Developer 1.5, but the DDL would still generated. It was picking something up, even though it had an error.
Our DBA has not been able to provided a work around. He says you have to login directly as the owner of the objects to use dbms_metdata in this fashion.
Is there any work around for this? I really need to be able to get DDL and I do not want to go back to 1.5 (I like the other new features of 2.1).
Thanks,
TomWe have several users currently using SQL Navigator and/or TOAD. We would like them to switch to SQL developer, but part of their job is to view the source of views in another schema. They have select privileges on the underlying tables and are able to see the source using other tools. Using SQL Developer, they receive on ORA-31603 because it's calling dbms_meta. Note ID 1185443.1 describes the issue and suggests granting the users the SELECT_CATALOG_ROLE.
We are hesitant about granting this role to these users which allows access to ever 1,700 objects, plus execute privileges to 4 objects.
Support indicated that Enhancement Request 8498115 addresses this issue.
Is this something that may be addressed in the next release?
Thanks,
Paul -
Generate report in different currency
HI,
I got a requirement to generate a report for an entity which is having default currency as "USD". This is very quite easy to generate report by selecting as entity currency. But the requirement is the same report must be in other currency like "GBP" which is not a parent currency of the Current Entity. But the currency is available in my Application. So How can i generate the report and what are things i need to do select? Please clarify my issue....
Thanks in advance....
ChallengerI am not very clear about your requirement. What do you mean by this?
But the requirement is the same report must be in other currency like "GBP" which is not a parent currency of the Current Entity. But the currency is available in my Application. Can you give us more info about the current layout of your report? Which dimensions do you have in your rows? Is currency an entity or a UDA?
Cheers,
Mehmet -
Sharing Stateful JavaBean between different sessions
Software
jboss4.0.5
jdk1.5_06
Problem
I require to share Stateful JavaBean between all the sessions in JBoss and it is required to use this server in a Swing Client side rather than with Tomcat servlet so please provide me the way for the same
Thanks in advance
CSJakhariaI finally got the answer at http://www.javaworld.com/javaworld/jw-07-1999/jw-07-cooltools.html?page=1
We can share it with the help of JNDI
Bye for now
CSJakharia -
Offline database and generating objects to different databases
I created an offline database with my objects, I can change them and push them back to the DB I got them from, but I cannot figure out how to push changes to a different database. I see where I can push to a different schema. I want to use the offline DB to maintain all my tables, and push the changes to a Test, Stage, QA DB's when I want but cannot find where to push the changes to a different database.
I created an offline database with my objects, I can change them and push them back to the DB I got them from, but I cannot figure out how to push changes to a different database. I see where I can push to a different schema. I want to use the offline DB to maintain all my tables, and push the changes to a Test, Stage, QA DB's when I want but cannot find where to push the changes to a different database.
Maybe you are looking for
-
Lovin' Chrome. Good bye Firefox!
-
Using Pro/E on a Mac using VMWare Fusion or BootCamp
Hi I have a MacBook Pro: Processor:2.4GHz Intel Core 2 Duo Memory: 4 GB 1067 Mhz DDR3 And recently for uni I have had to find a way to get Pro Engineer, a CAD program, running on my Mac. My solution was to buy VMWare Fusion and instal Windows 7 on my
-
I've found myself in a bit of a problem. My W510 no longer have any devices for the fingerprint reader, bluetooth, mobile broadband, integrated camera (and possibly some more). When comparing the devices in "Device Manager" to another W510, I notice
-
Every time I save a file "save as" my folders, lists etc. come up scrambled. I want them to be alphabetical every time. How can this be set? or fixed? I do NOT want to use Recent or click "set up details" everytime and then alphabetize the list, beca
-
Exception in method when trigger PDFObject WS
Hi, wonder anyone do before the PDFObject Tutorial. as i try to create a new Web Services the concept is about the same but different types... but somehow i encounter errors... as the WS has 4 methods createPdf (test.types.p1.CreatePdf parameters) ex