How to map wsdl to java in build.xml?
I write like this it is not working.............
<target name="generate.java" >
<taskdef name="wsdl2java"
classname="org.apache.ws.wsdl2java.WSDL2JavaTask"
classpathref="axis2.classpath"/>
<wsdl2java file="http://192.168.4/forums/forumIntegration.php?wsdl"
outputLocation="${build.dir}" >
<classpath>
<pathelement path="${axis2.classpath}"/>
<pathelement location="${build.dir}/classes"/>
</classpath>
</wsdl2java>
</target>
Have used the axis ant tasks successfully before with axis 1. Are you using axis two? What kind of errors are you getting?
Jim
Similar Messages
-
How to map WSDL string to BAPI in IR
Hi,can any body please let me know how to map the WSDL with XML string(notthe XML structure) to the SAP's BAPI structure. Here the BAPI structure contains tree like structure, and the WSDL(XML with one string) contains one field.
Thanks
KiranHi,
create a data type for a xml that is
inside your WSLD string
create a java or abap mapping which will remove the
wsld structure so you will only have xml string
now you can map this string to bapi
you can do it in one interface mapping
(you just need two mappings):
first one - remove the wsld
second - map xml to bapi
Regards,
michal -
How to map WSDL response to different RFC?
Hi ALL,
I have following scenario.
Suppose there are 2 different RFC like
1. RFC A (Async)
2. RFC B
And I have one WSDL (Web Service)
Now flow of scenario is as following
Step 1: RFC A will send request to WSDL (Web Service)
need to map RFC A request to WSDL request.
Step 2: WSDL response to RFC B
how can I map WSDL response to different RFC?
Can we map response of WSDL to different RFC? If yes please let me know the steps.
Thanks in advance.
Thanks,
BhupeshStep 1: RFC A will send request to WSDL (Web Service)
need to map RFC A request to WSDL request.
Step 2: WSDL response to RFC B
how can I map WSDL response to different RFC?
Have your communication as Asynchronous....
create your scenario as:
Scenario 1) RFC A ---> XI --> WSDL
Scenario 2)
WSDL --> XI (Mapping to RFC 1) --> SAP
WSDL --> (XI Mapping to RFC 2) --> SAP
In scenario 2 you will need:
1) Two MI...each based on the individual RFCs (RFC 1, 2)
2) Two mapping programs
In ID
1) One Sender Agreement
2) two receiver agreements
3) two interface determinations
4) in receiver determination check for some field which needs to be send to the RFC...this will imply that only a particular wsdl response is mapped to the RFCs (RFC1, 2)...here you can correlate using some value -
How to use Weblogic Server 6.1 build.xml with ant
Hi Java's
I have downloaded the latest version of BEA Weblogic server 6.1,they have changed the build.cmd to build.xml for compiling and building the ejb applications.they are telling that we have use $ant to run the build.xml but i couldn't able to do that.i'm getting "command not found error"..i'm using winnt.please help me how to use $ ant.Is it a seperate exe or batch file that i have to download ?if so where to download it.how to use it.please help.
Regards
BalajiTo use it after installation, set your path to your
<ant_installation_dir>\bin, then navigate to the diectory containing the build.xml. then follow the instructions in the weblogic documentation for running ant. -
Java Mapping Using JAXB [Java Arch for XML Binding]
Hi All,
Anyone tried using JAXB [Java Architecture for XML Binding API available with Java WebServices Pack] technique for XML processing in Java Mapping??
I am facing the following problems..
1. I am not able to generate namespace while marshalling target XML [In standalone mode and not tried in XI].
2. What are the jar files we need to import?
I tried importing the following jar files in XI.
jaxb-api.jar,jaxb-impl.jar,jaxb-libs.jar,jax-qname.jar,namespace.jar,relaxngDatatype.jar
and getting some errors while importing these files in XI.
3. It throws error at runtime [Interface Mapping-Test Tab]
like Resource not found:javax/xml/bind/Messages_en.properties,javax/xml/bind/Messages_en_US.properties
4. Even after creating a copy of available file Messages.Properties with name: Messages_en.properties and Messages_en_US.properties.. it is not generating any messages in Target message tab
Thanks in Advance,
Ananth ChinnarajSravya ,
I have searched wide and far for this, but no success.
A lot on JAXB XI and Webdynpro, but nothing on JAXB, XI and mappings.
Could you please post the url here ?
Thanks and kind regards,
Jan -
How to map idl to java for "union" type
help me
I'm not exactly sure what you're asking for. If you've written IDL that uses an IDL union type, it will be converted to Java when you use your IDL to Java compiler (like idlj), right?
If you're looking for the specification on how the compiler does/should do it, get the latest IDL to Java language mapping from the OMG -- www.omg.org. -
Hi
I'm trying to Map Oracle data to Java. Call some procedure which return nested table of object. I'm using thin driver. Here is my code.
type test1 as object
(data1 VARCHAR2(40),data2 varchar2(30));
type test2 IS TABLE OF test1;
procedure test (ven2 out test2);
Test Class:
OracleCallableStatement cstmt = (OracleCallableStatement)con.prepareCall("call Test(?)");
cstmt.registerOutParameter(1,OracleTypes.ARRAY,"TEST2");
cstmt.execute();
ARRAY array = cstmt.getARRAY(1);
Map map = con.getTypeMap();
map.put("SchemaName.TEST1", Class.forName(Test1Type.class.getName()));
// Retrieve array elements
Object[] myObjects = (Object[]) array.getArray();
// Each array element is mapped to MyObj object.
for (int i=0; i<myObjects.length; i++)
Test1Type obj = (Test1Type)myObjects;
Test1Type Class:
import java.sql.SQLException;
import oracle.jdbc.OracleConnection;
import oracle.jdbc.OracleTypes;
import java.sql.SQLData;
import java.sql.SQLInput;
import java.sql.SQLOutput;
import oracle.sql.STRUCT;
import oracle.sql.ARRAY;
import oracle.jpub.runtime.MutableStruct;
public class Test1Type implements SQLData {
public static final String SQLNAME = "SY_VCC.TEST2";
public static final int SQLTYPECODE = OracleTypes.ARRAY;
private String data1;
private String data2;
/* constructor */
public Test1Type ()
public void readSQL(SQLInput stream, String type)
throws SQLException
setData1(stream.readString());
setData2(stream.readString());
public void writeSQL(SQLOutput stream)
throws SQLException
stream.writeString(getData1());
stream.writeString(getData2());
public String getSQLTypeName() throws SQLException
return SQLNAME;
/* accessor methods */
public String getData1()
{ return data1; }
public void setData1(String xdata1)
{ data1 = xdata1; }
public String getData2()
{ return data2; }
public void setData2(String xdata2)
{ data2 = xdata2; }
The Test Class Throws the Exception
java.lang.ClassCastException: oracle.sql.STRUCT
Thanks in advanceThis construction is working well, but I can't still remap the STRUCT Object to the Test1Type class.
for (int i=0; i<myObjects.length; i++)
STRUCT myObjects2 = (STRUCT) myObjects;
Object[] Object2 = (Object[])myObjects2.getAttributes();
// Test1Type obj = (Test1Type)myObjects[i];
for (int j=0; j<Object2.length; j++)
System.out.println(Object2[j]);
The line Test1Type obj = (Test1Type)myObjects[i]; is throwing Exception java.lang.ClassCastException: oracle.sql.STRUCT.Do anybody know, if the problem is in the Test1Type class or Test class? -
Sending Custom Java Objects over XML!!
Hello all !
Can anybody please tell me how can I send custom Java Objects through XML? For example we can set attributes for a node using the setAttribute method, it accepts only strings, also the setTextContent method requires text and sets the node's value.Can I some way set my own Java object as the value of a particular node or attach it to the node?
Thanks in advance.Kami_Pakistan wrote:
So I should rather go for Marshalling or Serialization or is there any other work-around possible?I don't know. You didn't say what you had against text formats. Since all Java objects are composed of primitives when you get right down to the bottom, everything in Java can be serialized as text versions of those primitives. So you're going to have to explain why you think a work-around is necessary at all. -
I would like to replicate the action of JDeveloper compiling and deploying a given process to a remote BPEL PM Server.
When I establish the BPELPM server connection in jdev, I just specify the host/port and I'm prompted for password and domain at deployment time.
How can I replicate this in a build.xml using obant? The server is running on midtier of OAS on an OC4J titled OC4J_BPEL.
My real objective is to deploy to multiple servers in the same script, but need to get one working first.I'd like to use the 'scp' ANT task via obant but it does not seem to be available with the default configuration. I fetched the jsh jar file as instructed by the ANT manual (http://ant.apache.org/manual/OptionalTasks/scp.html).
I'm still not able to use the 'scp' task. Below is the output from obant upon reading the 'scp' task:
Ant could not find the task or a class this task relies upon.
This is common and has a number of causes; the usual
solutions are to read the manual pages then download and
install needed JAR files, or fix the build file:
- You have misspelt 'scp'.
Fix: check your spelling.
- The task needs an external JAR file to execute
and this is not found at the right place in the classpath.
Fix: check the documentation for dependencies.
Fix: declare the task.
- The task is an Ant optional task and the JAR file and/or libraries
implementing the functionality were not found at the time you
yourself built your installation of Ant from the Ant sources.
Fix: Look in the ANT_HOME/lib for the 'ant-' JAR corresponding to the
task and make sure it contains more than merely a META-INF/MANIFEST.MF.
If all it contains is the manifest, then rebuild Ant with the needed
libraries present in ${ant.home}/lib/optional/ , or alternatively,
download a pre-built release version from apache.org
- The build file was written for a later version of Ant
Fix: upgrade to at least the latest release version of Ant
- The task is not an Ant core or optional task
and needs to be declared using <taskdef>.
- You are attempting to use a task defined using
<presetdef> or <macrodef> but have spelt wrong or not
defined it at the point of use
Remember that for JAR files to be visible to Ant tasks implemented
in ANT_HOME/lib, the files must be in the same directory or on the
classpath
Please neither file bug reports on this problem, nor email the
Ant mailing lists, until all of these causes have been explored,
as this is not an Ant bug. -
Hi ,
How to map javax.xml.datatype.XMLGregorianCalendar to java.util.Calendar so that i can use pass String parameter in YYYY-MM-DD format to my Web service.
I generated the schema classes using Jaxb 2.1.5.
Please give suggestion
Thanks in Advance.toGregorianCalendar().getTime()
-
How to map building construction service contract
how to map building construction service contract
pls let me know the mapping in sap and proceedure for bill passing and paymentsHi,
You can use a service contract or a partial invoicing plan (framework order) to map it in SAP.
Reg,
Deepak. -
How to execute an ABAP Mapping after a Java Mapping
Hi, i have found a Bug in XI and SAP said to me that the only solution is to execute an ABAP mapping after my java mapping.
I have an IDOC to FILE scenario
Could anyone orient me on what do i have to configure, so after my java mapping i can execute an abap mapping ?.
Do i have to use process integration?
thanks
Mariano.i have developed a Java mapping originally, but XI has a bug. When you do not write anything to the outputStream XI instead of writing an emtpy file writes a file containing one byte ( 0x00 ) and this is a problem.
SAP said to me that they will not fix this issue so they recomend me to create an abap mapping after my java mapping that will send no information if it receives this byte (0x00) and if not it will write all the information as received.
My doubt regarding putting several mappings in the interface mapping configuration is this...
Actual configuration:
SOURCE MSG A -> ORIGINAL MAPPING -> TARGET MSG B
Proposed configuration
SOURCE. MSG A -> ORIGINAL MAPPING -> TARGET MSG B
SOURCE. MSG A -> PATCH MAPPING -> TARGET MSG B
I dont understand what receives de "patch mapping" it receives the structure from TARGET MSG B?
regards
mariano -
How to map a collection of object in TopLink?
For (simple) example, I've a XSD that defines:
<xsd:complexType name="AttachmentType">
<xsd:sequence>
<xsd:element name="docID" nillable="false" type="xsd:string"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="MyDocType">
<xsd:sequence>
<xsd:element name="attachment" nillable="true" minOccurs="0"
maxOccurs="unbounded" type="tns:AttachmentType"/>
</xsd:sequence>
</xsd:complexType>
This XSD is referenced by a WSDL. Using JDeveloper to generate a Java Web Service using the WSDL and will get the following classes:
public class AttachmentType implements java.io.Serializable
protected java.lang.String docID;
public AttachmentType() { }
public java.lang.String getDocID() { return docID; }
public void setDocID(java.lang.String docID) { this.docID = docID; }
public class MyDocType implements java.io.Serializable
protected AttachmentType[] attachment;
public MyDocType () { }
public AttachmentType[] getAttachment() { return attachment; }
public void setAttachment(AttachmentType[] attachment)
this.attachment = attachment;
Now I want to generate a XML document from MyDocType. I use TopLink (JAXB) to do the mapping. However, how to map the 'attachment' of type AttachmentType[]? TopLink seems only allowing List/Set/Collection container options.
Anyone can help?
Note: I have to use the classes generated from WSDL.
Thanks!!Thanks. I'm using TopLink Workbench for the mapping
and have no idea on how to specify the XML
transformation mapping for array attribute. Can you
tell me more?I was putting together an example of the transformation mapping but came up with a better way. It turns out that a transformation mapping isn't ideal because you have to take over some of the responsibility for converting XML to objects. A better solution is to intercept the calls to the getter and setter for the AttachmentType[] and convert between an Array and List. Just map the Array as a composite collection in the workbench and customize the attachment attribute mapping in code.
Each mapping in TopLink has Accessor object responsible for getting and setting values in objects. If you choose method or direct access the mapping will have a different Accessor class. So the solution is to use an Accessor that converts the List TopLink builds into an Array of the correct type on set. On get, the Accessor creates a List from the Array.
You can introduce a custom Accessor using an After Load method. I've put a complete example up on my googlepages account[1]. The key code is listed below. Note that this code assumes you're using direct instance variable access. Also, this code works with TopLink 10.1.3.2 and the TopLink 11 preview. It won't work with previous versions.
The After Load class that changes the mapping accessor:
public class MyDocCustomizer {
public static void customize(ClassDescriptor descriptor) {
XMLCompositeCollectionMapping mapping = (XMLCompositeCollectionMapping)
descriptor.getMappingForAttributeName("attachment");
InstanceVariableAttributeAccessor existingAccessor =
(InstanceVariableAttributeAccessor) mapping.getAttributeAccessor();
ListArrayTransformationAccessor transformationAccessor =
new ListArrayTransformationAccessor(AttachmentType.class, "attachment");
transformationAccessor.initializeAttributes(descriptor.getJavaClass());
mapping.setAttributeAccessor(transformationAccessor);
}The custom InstanceVariableAccessor subclass:
public class ListArrayTransformationAccessor extends
InstanceVariableAttributeAccessor {
private Class arrayClass;
public ListArrayTransformationAccessor(Class arrayClass, String attributeName) {
super();
this.arrayClass = arrayClass;
this.setAttributeName(attributeName);
public Object getAttributeValueFromObject(Object anObject)
throws DescriptorException {
Object[] attributeValueFromObject =
(Object[]) super.getAttributeValueFromObject(anObject);
return Arrays.asList(attributeValueFromObject);
public void setAttributeValueInObject(Object anObject, Object value)
throws DescriptorException {
List collection = (List)value;
Object[] array = (Object[]) Array.newInstance(arrayClass, collection.size());
for (int i = 0; i < collection.size(); i++) {
Object element = collection.get(i);
Array.set(array, i, element);
super.setAttributeValueInObject(anObject, array);
}--Shaun
http://ontoplink.blogspot.com
[1] http://shaunmsmith.googlepages.com/Forum-519205-OXM-Array.zip -
How to add arguments in java command
hi All,
I am using ant for calling java command. How do I add more than 1 argument for <arg> tag ?.
<target name="A" depends="prepare" description="Starts the client" >
<java classname="Starter" fork="yes">
<args>
<arg value="${clientArg1}"/>
<arg value="${clientArg2}"/>
</args>
</java>
</target>
Here i get an exception that "The <java> task doesn't support the nested "args" element.".
How do I pass more than one argument for java command ?.
Hoping for reply.
Thanks and regards,
Sachin PAre you serious?
<project name="foo" default="doThatVoodoo">
<property name="arg1" value="foo" />
<property name="arg2" value="bar" />
<target name="doThatVoodoo">
<echo message="${arg1}"/>
<echo message="${arg2}"/>
</target>
</project>
C:\>ant -Darg1=mud -Darg2=bug
Buildfile: build.xml
doThatVoodoo:
[echo] mud
[echo] bug
BUILD SUCCESSFUL
Total time: 0 seconds -
How to see wsdl in JBoss?
Hi,
I have deployed a WebService application in JBoss. How to see wsdl at server (JBoss) side?
I have supplied url: http://localhost:8080 in the browser,
It is showing the below page, from here how to see the wsdl file?
JBoss Online Resources
* JBoss Documentation
* JBoss Wiki
* JBoss JIRA
* JBoss Forums
JBoss Management
* Tomcat status (full) (XML)
* JMX Console
* JBoss Web Consolethank you for your consideration,Hi,
I have downloaded an application from internet
The interface is :
package webservice1;
import javax.jws.WebService;
import javax.jws.WebMethod;
import java.rmi.Remote;
import java.rmi.RemoteException;
import javax.jws.soap.SOAPBinding;
import javax.jws.soap.SOAPBinding.Style;
@WebService(name="Calculator1")
@SOAPBinding(style=Style.RPC)
public interface Calculator extends Remote
@WebMethod int add(int x, int y);
@WebMethod int subtract(int x, int y);
}and the implementation is:
package webservice1;
import javax.ejb.Stateless;
import javax.jws.WebService;
import javax.jws.soap.SOAPBinding;
import javax.jws.soap.SOAPBinding.Style;
@Stateless
@WebService(name="Calculator1", endpointInterface="webservice1.Calculator")
public class CalculatorBean implements Calculator
public int add(int x, int y)
return x + y;
public int subtract(int x, int y)
return x - y;
}application folder name: calculatorwebservice
I am giving the url:
http://127.0.0.1:8080/calculatorwebservice/Calculator1?wsdlbut JBoss giving Error: 404
HTTP Status 404 - /calculatorwebservice/Calculator1
type Status report
message /calculatorwebservice/Calculator1
description The requested resource (/calculatorwebservice/Calculator1) is not available.
Apache Tomcat/5.5.20I am unable to give proper URL, according to the above code what could be the url to look the WSDL?
thank you for your kind consideration,
Maybe you are looking for
-
My iMac 24" (model late 2008, I think I ran Lion or Mountain Lion) froze when I was working in Adobe Photoshop, so I had to manually (using the power button) turn it off and on again. Then, 5 minutes later, working in Photoshop again, the computer fr
-
When I try to sign in to the support community using one of my e-mail addresses and I put in nothing or what I thought was my apple support community user name I can get one of several messages Ie.1. Please specify a user name 2.An account using this
-
How to Delete the Software Conponents in BULK from IR
Hi, I have Imported many number of software components those were available in SLD into IR unexpectedly I know we can delete those from IR one by one using this Blog How to : Delete Software Component from Integration Builder But How to delete all th
-
Dell 24" LCD HD S2409 Question?
Hello, Im just looking at maybe purchasing the above and I dont really know a great deal about monitors etc but the resolution for it states 1920x1080 and would this be fine with the mini as I have used a 24" 1920x1200 ACD before and wondered if the
-
Font rendering change after upgrade
After upgrading freetype from current to the latest version I noticed that my fonts changed. The rendering was thicker, as in most other linux distributions. Not that it was bad, but I prefer the thin ones Arch had up to now.To solve it I just downgr