Reusing JAXB generated classes for XSDs included in other XSDs
Hi,
I use xsds with jaxb in a number of related projects. To avoid duplication I've factored out commonly used elements into their own xsd in a separate project. I then include these in the xsds that need them.
I generate classes with jaxb for each project. I'm now trying to get jaxb so far as to reuse the already generated classes for the common elements.
For example: I have a general xsd Person.xsd for which I generate classes in common.xsd. I have another xsd Project.xsd that includes a reference to the Person element. When i let jaxb generate classes for Projects.xsd, it will also generate a project.xsd.PersonType and so on.
Is there any way to tell JAXB to use the existing classes? I've played around with the <jxb:javaType> bindings, but I can't get it to work yet. It gives me a "bindings not used" warning and doesn't compile. Also, if this is in fact the way to go, what do I specify as the parseMethod and printMethod attributes for the javaType element?
Thx for any help
JAXB questions should be better directed to the users list of http://jaxb.dev.java.net/
you should subscribe to the 'users' mailing list, then post a question there.
Thank you!
Similar Messages
-
How to use JAXB generated classes with SOAP
hello,
I have a library of JAXB generated classes for my web service. There is a Java class for each web method defined in my schema. For example, my getLocation method is mapped to GetLocation.class.
However my web service is SOAP based, so I am having to manually strip off the SOAP elements to be able to unmarshall the getLocation xml to a GetLocation class.
I am noticing a disconnect between JAXB and other Java SOAP and RPC libraries. Does anyone know how to create a JAXB class for SOAP Envelopes and Bodys? Does anyone have any ideas how to incorporate the existing Java web service libraries with JAXB?
Thanks in advance.Have you found a method to integrate SAAJ and JAXB? Or
is better to use SAAJ only ?If I had to choose I'd go with SAAJ. It seems to me that's theoretically possible to use JAXB classes with SAAJ but I imagine if it is possible it would be a big pain in the ass. -
Generating classes for all types in WSDL
Is there a way to get Flash Builder to generate classes for all the complex types found in a WSDL?
The web service I am trying to connect to essentially has one method that takes a BaseRequest object and returns a BaseResponse object. If passed a DerivedRequest object (extending BaseRequest), it returns a DerivedResponse (extending BaseResponse). However, Flash Builder only generates classes for BaseRequest and BaseResponse, and not DerivedRequest or DerivedResponse.
Thanks for any helpThe Web Service import wizard generates Value Object classes for all the associated data types required by the imported operations. Say you imported only 2 out of 10 operations mentioned in the WSDL, you will have classes generated for only those data typed required by the 2 imported operations, which may not result in generation of all data types.
In the case mentioned by you, what I assume is that, the operations are mentioned in the WSDL to return the BaseResponse and take BaseRequest as param.
Now using the above mentioned logic the introspector does not know that the derivedResponse may be required and does not import it. Had the operation pointed to the DerivedResponse directly it would have got imported.
A suggested workaround can be that you implement the custom properties in the generated Is there a way to get Flash Builder to generate classes for all the complex types found in a WSDL?
Currently there is no such switch in FB. You may log an enhancement request at http://bugs.adobe.com/jira for the same.
Thanks,
- Gaurav -
Failed to generate classes for home
Using RMI we successfully connected Oracle OC4j 9.0.3 EJB to WL7.0 EJB but since
our upgrade we are getting the following
Any Ideas
Cheers
Bruce
weblogic.utils.AssertionError: ***** ASSERTION FAILED *****[ Failed to generate
class for com.towertechnology.wc.sis.ejb.lette
rurl.LetterURL_aleqcw_HomeImpl_811_WLStub ]
at weblogic.rmi.internal.StubGenerator.generateStub(StubGenerator.java:662)
at weblogic.rmi.internal.StubGenerator.generateStub(StubGenerator.java:651)
at weblogic.rmi.extensions.StubFactory.getStub(StubFactory.java:59)
at weblogic.common.internal.RemoteObjectReplacer.resolveObject(RemoteObjectReplacer.java:249)
at weblogic.rmi.internal.StubInfo.readResolve(StubInfo.java:134)
at java.lang.reflect.Method.invoke(Native Method)
at java.io.ObjectStreamClass.invokeMethod(Unknown Source)
at java.io.ObjectInputStream.readObject(Unknown Source)
at java.io.ObjectInputStream.readObject(Unknown Source)
at weblogic.common.internal.ChunkedObjectInputStream.readObject(ChunkedObjectInputStream.java:140)
at weblogic.rjvm.MsgAbbrevInputStream.readObject(MsgAbbrevInputStream.java:91)
at weblogic.rmi.internal.ObjectIO.readObject(ObjectIO.java:56)
at weblogic.rjvm.ResponseImpl.unmarshalReturn(ResponseImpl.java:161)
at weblogic.rmi.cluster.ReplicaAwareRemoteRef.invoke(ReplicaAwareRemoteRef.java:264)
at weblogic.rmi.cluster.ReplicaAwareRemoteRef.invoke(ReplicaAwareRemoteRef.java:230)
at weblogic.jndi.internal.ServerNamingNode_WLStub.lookup(Unknown Source)
at weblogic.jndi.internal.WLContextImpl.lookup(WLContextImpl.java:337)
at weblogic.jndi.internal.WLContextImpl.lookup(WLContextImpl.java:332)
at javax.naming.InitialContext.lookup(InitialContext.java:345)
at com.workcover.proc.SeraphApplication.getHome(SeraphApplication.java:144)
at com.workcover.proc.SeraphApplication.call(SeraphApplication.java:85)
at com.workcover.proc.SeraphApplication.call(SeraphApplication.java:77)
at com.workcover.proc.RMIProxyBean.call(RMIProxyBean.java:56)
at RMIProxy_StatelessSessionBeanWrapper24.call(RMIProxy_StatelessSessionBeanWrapper24.java:117)
at com.workcover.proc.HttpCallProxy.invokeEJB(HttpCallProxy.java:129)
at com.workcover.proc.HttpCallProxy.doPost(HttpCallProxy.java:97)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at com.evermind.server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:65)
at oracle.security.jazn.oc4j.JAZNFilter.doFilter(JAZNFilter.java:283)
at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:560)
at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:306)
at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:767)
at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:148)
at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:72)
at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:803)
at java.lang.Thread.run(Unknown Source)Anyone have an answer for this problem? I'm getting it with 7.0 SP3. Not helpful that WLS doesn't not give any reason why it fails.
-
JAXB unmarshalling error for " " token as part of xsd:string type element
JAXB unmarshalling error for "<" token as part of xsd:string type element
We are getting a JAXB unmarshalling error:
while processing the following <condition> tag which is of type xsd:string
<condition> x < 100 </condition>
The error is probably happening due to "<" token as a part of string type.
xml.bind.JAXBException: Unexpected error in Unmarshalling
at oracle.xml.jaxb.JaxbUnmarshaller.unmarshal(JaxbUnmarshaller.java:224)
Any ideas how to resolve this issue?
Note
<condition> x > 100 </condition> is getting unmarshalled successfully by JAXB unmarshaller.
ThanksHi,
Did you tried to put & lt; (without space) instead of < ?
Best Regards,
Paweł -
BPEL Question : assign one xsd:unbounded to other xsd:unbounded
Hi, i have a problem executing a bpel which maybe im procesing bad.
I am invoking some web services:
response of webservice #1 returns a list of elements. (xsd:)
request of webservice #2 receives a list with some elements from the response above (ws #1).
[JPG helps to understand that process.|http://img230.imageshack.us/img230/6471/img1pa0.jpg]
is there somenthing im missing when I try to assign one xsd:unbounded to other xsd:unbounded?
runtime appserver stacktrace in the bpel process.
BPCOR-6129:Line Number is 77
BPCOR-6130:Activity Name is Assign_DatosGeneradorReporte
at com.sun.jbi.engine.bpel.core.bpel.engine.impl.BPELInterpreter.createVirtualFaultUnit(BPELInterpreter.java:250)
at com.sun.jbi.engine.bpel.core.bpel.engine.impl.BPELInterpreter.execute(BPELInterpreter.java:202)
... 7 more
Caused by: com.sun.xml.transform.sware.TooManyElementsException: Too many elements: {null}cedula
at com.sun.xml.transform.sware.impl.DOMSorter.addToSortedList(DOMSorter.java:509)
at com.sun.xml.transform.sware.impl.DOMSorter.sort(DOMSorter.java:296)
at com.sun.xml.transform.sware.impl.DOMSorter.sort(DOMSorter.java:413)
....Thanks!I have figured out that with xpath and copy-of operation I can copy all nodes that come in place of xsd:any from one schema to other .But beofre copying I want to change the attribute values of the node that come in place of xsd:any based on the mapping stored in the DVM.Request some one to please help .
-
Problem facing while generating classes for mixed="true" in jaxb
<complexType name="ANY" abstract="true"></complexType>
<complexType name="BIN" abstract="true" mixed="true">
<complexContent>
<extension base="tns:ANY"></extension>
</complexContent>
</complexType>
When JAXB is generating the classes for above complex types. It is not generationg java.util.List
getContent() method for BIN complex type.
Can Someone please tell me how can i generate that method . without changing the sche[POI FAQ|http://poi.apache.org/faq.html]
[POI Mailing Lists|http://poi.apache.org/mailinglists.html] -
Specifying package structure and inheritance for jaxb generated classes ??
Friends,
Now I am tuned up with the sweet JAXB utility...
I need answers to this..
1. How do I specify a package structure in my generated java files?
2. How do I specify inheritance heirarchy to my generated java files ?
I assume, there must be some way of doing this, without opening the actuall source.
any ideas ??
Thanks
Rakeshhow about inheritance heirarchy ? What if i plan to include theses generated classes in my inheritance heirarchy ?
Bhakti, any idea what is the final version release date ? I desperately need answer to this.
Thanks
Rakesh -
Wscompile only generates classes for the first wsdl:portType encountered
Greetings.
When
compiling a WSDL with port types as follows below;
classes are generated for port type: AccountsManagement only.
<portType name="AccountsManagement">
<operation name="CreateAccount" parameterOrder="Account">
<input message="tns:CreateAccountReq"/> <!-- name defaults to CreateAccountReqRequest -->
<output message="tns:CreateAccountReqResponse"/>
</operation>
<operation name="CreateAccountForPerson" parameterOrder="Account UniqueId">
<input message="tns:CreateAccountForPersonReq"/>
<output message="tns:CreateAccountForPersonReqResponse"/>
</operation>
</portType>
<portType name="PersonsManagement">
<operation name="AddPerson" parameterOrder="Person">
<input message="tns:AddPersonReq" name="AddPersonReq"/>
<output message="tns:AddPersonReqResponse" name="AddPersonReqResponse"/>
</operation>
<operation name="AddPersonWithAccount" parameterOrder="Person Account">
<input message="tns:AddPersonWithAccountReq" name="AddPersonWithAccountReq"/>
<output message="tns:AddPersonWithAccountReqResponse" name="AddPersonWithAccountReqResponse"/>
</operation>
</portType>
<portType name="TellersOperations">
<operation name="ListAccountsForPerson" parameterOrder="UniqueId">
<input message="tns:ListAccountsForPersonReq"/>
<output message="tns:ListAccountsForPersonReqResponse"/>
</operation>
</portType>Netbeans output:
init:
wscompile-init:
Created dir: C:\PROJECTS\WSTest\build\generated\wsclient
Created dir: C:\PROJECTS\WSTest\build\generated\wsservice
Created dir: C:\PROJECTS\WSTest\build\generated\wsbinary
TestBankingService_wscompile:
command line: wscompile "C:\Program Files\Java\jdk1.5.0_03\jre\bin\java.exe" -classpath "C:\Program Files\Java\jdk1.5.0_03\lib\tools.jar;C:\Program Files\netbeans-4.1\SunAppServer8.1\lib\j2ee.jar;C:\Program Files\netbeans-4.1\SunAppServer8.1\lib\saaj-api.jar;C:\Program Files\netbeans-4.1\SunAppServer8.1\lib\saaj-impl.jar;C:\Program Files\netbeans-4.1\SunAppServer8.1\lib\jaxrpc-api.jar;C:\Program Files\netbeans-4.1\SunAppServer8.1\lib\jaxrpc-impl.jar" com.sun.xml.rpc.tools.wscompile.Main -d "C:\PROJECTS\WSTest\build\generated\wsbinary" -features:wsi,strict -import -keep -mapping "C:\PROJECTS\WSTest\web\WEB-INF\TestBankingService-mapping.xml" -nd "C:\PROJECTS\WSTest\build\web\WEB-INF\wsdl" -s "C:\PROJECTS\WSTest\src\java" -verbose -Xprintstacktrace "C:\PROJECTS\WSTest\src\java\bankers\server\TestBankingService-config.xml"
[ServiceInterfaceGenerator: creating service interface: bankers.server.TestBankingService]
[CustomClassGenerator: generating JavaClass for: Account]
BUILD SUCCESSFUL (total time: 2 seconds)There should be a class for Person as well. If I move port type:
PersonsManagement to the top no Account class will be generated, but
instead the Person class will be generated.
Loading up the WSDL in Netbeans (client) works and shows
all three Ports with their respective operations.
Is there a reason for only allowing more than one port type per WSDL?
Checked the man page for switches to "loop" though all portTypes but noluck.
A bug?
Thanks,
WSDL for reference
<?xml version="1.0" encoding="UTF-8"?>
<definitions name="BankingService" targetNamespace="http://www.mycomp.org/schemas/MyWebService"
xmlns:tns="http://www.mycomp.org/schemas/MyWebService"
xmlns:ns1="urn:WS/types"
xmlns="http://schemas.xmlsoap.org/wsdl/"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<!-- Type definitions -->
<types>
<xsd:schema targetNamespace="urn:WS/types">
<xsd:element name="Person" type="ns1:Person"/>
<xsd:element name="Account" type="ns1:Account"/>
<xsd:element name="ListOfAccounts" type="ns1:ListOfAccounts"/>
<xsd:element name="ResultCode" type="xsd:unsignedInt"/>
<xsd:element name="AccountNumber" type="xsd:string"/>
<xsd:element name="UniqueId" type="xsd:string"/>
<xsd:complexType name="Person">
<xsd:sequence>
<xsd:element name="DisplayName" type="xsd:string"/>
<xsd:element name="UniqueId" type="xsd:string"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="Account">
<xsd:sequence>
<xsd:element name="Number" type="xsd:string"/>
<xsd:element name="Type" type="xsd:token"/>
<xsd:element name="Amount" type="xsd:integer"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="ListOfAccounts">
<xsd:sequence>
<xsd:element name="Account" type="ns1:Account" minOccurs="0" maxOccurs="unbounded"/>
</xsd:sequence>
</xsd:complexType>
</xsd:schema>
</types>
<message name="AddPersonReq">
<part name="Person" element="ns1:Person"/>
</message>
<message name="AddPersonReqResponse">
<part name="ResultCode" element="ns1:ResultCode"/>
</message>
<message name="AddPersonWithAccountReq">
<part name="Person" element="ns1:Person"/>
<part name="Account" element="ns1:Account"/>
</message>
<message name="AddPersonWithAccountReqResponse">
<part name="AccountNumber" element="ns1:AccountNumber"/>
</message>
<message name="CreateAccountReq">
<part name="Account" element="ns1:Account"/>
</message>
<message name="CreateAccountReqResponse">
<part name="AccountNumber" element="ns1:AccountNumber"/>
</message>
<message name="CreateAccountForPersonReq">
<part name="Account" element="ns1:Account"/>
<part name="UniqueId" element="ns1:UniqueId"/>
</message>
<message name="CreateAccountForPersonReqResponse">
<part name="AccountNumber" element="ns1:AccountNumber"/>
</message>
<message name="ListAccountsForPersonReq">
<part name="UniqueId" element="ns1:UniqueId"/>
</message>
<message name="ListAccountsForPersonReqResponse">
<part name="Accounts" element="ns1:ListOfAccounts"/>
</message>
<!--
NOTE THAT wscompile WILL PICK THE FIRST AND ONLY FIRST portType
IS THIS A BUG OR A FEATURE?
-->
<portType name="AccountsManagement">
<operation name="CreateAccount" parameterOrder="Account">
<input message="tns:CreateAccountReq"/> <!-- name defaults to CreateAccountReqRequest -->
<output message="tns:CreateAccountReqResponse"/>
</operation>
<operation name="CreateAccountForPerson" parameterOrder="Account UniqueId">
<input message="tns:CreateAccountForPersonReq"/>
<output message="tns:CreateAccountForPersonReqResponse"/>
</operation>
</portType>
<portType name="PersonsManagement">
<operation name="AddPerson" parameterOrder="Person">
<input message="tns:AddPersonReq" name="AddPersonReq"/>
<output message="tns:AddPersonReqResponse" name="AddPersonReqResponse"/>
</operation>
<operation name="AddPersonWithAccount" parameterOrder="Person Account">
<input message="tns:AddPersonWithAccountReq" name="AddPersonWithAccountReq"/>
<output message="tns:AddPersonWithAccountReqResponse" name="AddPersonWithAccountReqResponse"/>
</operation>
</portType>
<portType name="TellersOperations">
<operation name="ListAccountsForPerson" parameterOrder="UniqueId">
<input message="tns:ListAccountsForPersonReq"/>
<output message="tns:ListAccountsForPersonReqResponse"/>
</operation>
</portType>
<binding name="AccountsManagementBinding" type="tns:AccountsManagement">
<soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/>
<operation name="CreateAccount">
<soap:operation soapAction=""/>
<input name="CreateAccountReq">
<soap:body use="literal"/>
</input>
<output name="CreateAccountReqResponse">
<soap:body use="literal"/>
</output>
</operation>
<operation name="CreateAccountForPerson">
<soap:operation soapAction=""/>
<input name="CreateAccountForPersonReq">
<soap:body use="literal"/>
</input>
<output name="CreateAccountForPersonReqResponse">
<soap:body use="literal"/>
</output>
</operation>
</binding>
<binding name="PersonsManagementBinding" type="tns:PersonsManagement">
<soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/>
<operation name="AddPerson">
<soap:operation soapAction=""/>
<input name="AddPersonReq">
<soap:body use="literal"/>
</input>
<output name="AddPersonReqResponse">
<soap:body use="literal"/>
</output>
</operation>
<operation name="AddPersonWithAccount">
<soap:operation soapAction=""/>
<input name="AddPersonWithAccountReq">
<soap:body use="literal"/>
</input>
<output name="AddPersonWithAccountReqResponse">
<soap:body use="literal"/>
</output>
</operation>
</binding>
<binding name="TellersOperationsBinding" type="tns:TellersOperations">
<soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/>
<operation name="ListAccountsForPerson">
<soap:operation soapAction=""/>
<input name="ListAccountsForPersonReq">
<soap:body use="literal"/>
</input>
<output name="ListAccountsForPersonReqResponse">
<soap:body use="literal"/>
</output>
</operation>
</binding>
<service name="BankingService">
<port name="AccountsManagementService" binding="tns:AccountsManagementBinding">
<soap:address location="__URL__"/>
</port>
<port name="PersonsManagementService" binding="tns:PersonsManagementBinding">
<soap:address location="__URL__"/>
</port>
<port name="TellersOperationsService" binding="tns:TellersOperationsBinding">
<soap:address location="__URL__"/>
</port>
</service>
</definitions>I saw this post elsewhere:
JAXRPC specification required support for only subset of schema types. Abstract schema type support was not required. For the schema types that are not supported, the spcification requires that they should be mapped to javax.xml.soap.SOAPElement.
This is what jaxrpc wscompile tool does. At tool time, the type in the sample code posted is extended frm an abstract type so it should be getting mapped to SOAPElement. SOAPElement extends Node and Element. You may like to see its javadoc.
-vivek.
This is basically the behavior I am seeing, but I don't see this as being extended from an abstract type. if someone can see that and explain that to me I would appreciate it....if this is even the right path to the answer to my problem. -
Jcomgen doesn't generate classes for FineReader 7 engine
Hi,
currently I'm using njawin 1.1.34 to control FineReader 6 Scripting Edition which works quite well :-)
Recently we tried to upgrade to FineReader 7 engine which offers several additional features we'd like to use. Unfortunately jcomgen.exe doesn't generate all the necessary classes; only a few are created although there are lots of entries in the ProgID combobox, the TypeLib GUID seems to be corrent, and the typelib module is selected correctly.
Example:
The FineReader engine exports an object called "Block" and one called "BlocksCollection"; the latter is - as the name suggests - a collection of objects of type "Block ". jcomgen only generates a class for the collection.
Do you have any idea why jcomgen doesn't want to generate all the available classes?
Regards
ThorstenDo you ever figure this out?
I'm trying to use FineReader engine too.
I've tried with 7 to no avail.
Am stuck at the 2nd step with 6, too, though. How do you create the Engine? I'm creating a FuncPtr, but can't figure out how to invoke things and get the created engine back.
Would REALLY appreciate your help!
thanks,
David -
Syntax error for automatic generated class for object MAS_AUTH_CUST
Hi,
I am configuring the mobile sales scenario. I encountered a weird problem. Basically the automatically generated class ZDOECL_013_00H_MWSR can not be activated. If you activate it manually it will give you the below error. Looks like the entity structure is too big. So the generated code has a very big loop which causes the dump. I found the issue when try to run the function module CRM_AUTH_CUST_INSERTCDS as suggested in the configuration guide.
I have tried to regenerate the object. But it still give me the same error.
Internal error occured during runtime generation of Class ZDOECL_013_00H_MWSR (Dump ID: GEN_BRANCHOFFSET_LIMIT_REACHED)
Message no. OO053
Diagnosis
An internal error occurred when the system tried to generate the runtime objects of the class. A dump has been created with the given dump ID. It can be analyzed using transaction ST22.
Our Netweaver version as below. It should contain already the latest patch etc.
SAP_ABA 711 0006 SAPKA71106
SAP_BASIS 711 0006 SAPKB71106
PI_BASIS 711 0006 SAPK-71106INPIBASIS
ST-PI 2008_1_710 0004 SAPKITLRE4
SAP_BW 711 0006 SAPKW71106
CRMSPGWY 110 0004 SAPK-11004INCRMSPGWY
CRM version.
SAP_ABA 702 0006 SAPKA70206
SAP_BASIS 702 0006 SAPKB70206
PI_BASIS 702 0006 SAPK-70206INPIBASIS
ST-PI 2008_1_700 0002 SAPKITLRD2
SAP_BS_FND 702 0004 SAPK-70204INSAPBSFND
SAP_BW 702 0006 SAPKW70206
LCAPPS 2005_700 0009 SAPKIBHD09
SAP_AP 700 0022 SAPKNA7022
WEBCUIF 701 0003 SAPK-70103INWEBCUIF
BBPCRM 701 0003 SAPKU70103
WFMCORE 200 0016 SAPK-20016INWFMCORE
VIRSANH 530_700 0011 SAPK-53311INVIRSANH
Any advice is appreciated.
Thanks
Hansen ChenHi,
Gateway1.1 to SAP Netweaver mobile is not supported with EHP1 of SAP Netweaver Mobile 7.10.
Please check the release information note: 1539681
So, i suggest you to install SAP Netweaver Mobile 7.10 with Gateway addon.
Regards,
Siva. -
QR Code/Datamatrix Generator Class for Java
Hi
i want to implement QR Code/Datamatrix in my Application.
Goolging for around 2 hours couldnt give me any results.
Is there a class, api, library, that could help me generating Images out of strings?
Nam"i want to implement QR Code/Datamatrix in my Application."
Then just pick one of the libraries, I rand across literally a dozen while I was looking for that how to implementation for you to code.
Please note for future use--implement has specific meaning to programmers--usually having a do it yourself connotation--as in: I want to build my own package to do this. -
Ant autotype does not seem to recognize xsd:include
Hi
I am currently using WebLogic 7.0. I was trying to use ant autotype to generate
java classes based on a schema. I ran into a problem that the autotype does not
seem to include the other schema files listed with xsd:include. I could only get
around the problem by literally copy and paste the complex types definition into
the calling schema file. Below are the two schemas that illustrate the problem.
x.xsd includes y.xsd but however the EmployeeBean listed in y.xsd results in a
unresolve type with autotype. Problem only goes away if EmployeeBean definition
is listed in x.xsd.
Any help is much appreciated.
==========================================================
x.xsd
==========================================================
<?xml version="1.0" encoding="utf-8" standalone="no"?>
<xsd:schema xmlns:ofx="http://ofx.net/v3.0"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
targetNamespace="http://ofx.net/v3.0">
<xsd:include schemaLocation="y.xsd" />
<xsd:complexType name="Company">
<xsd:sequence>
<xsd:element name="XYZ" type="ofx:EmployeeBean" />
</xsd:sequence>
</xsd:complexType>
</xsd:schema>
==========================================================
y.xsd
==========================================================
<?xml version="1.0" encoding="utf-8" standalone="no"?>
<xsd:schema targetNamespace="http://ofx.net/v3.0"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:ofx="http://ofx.net/v3.0">
<xsd:complexType name="EmployeeBean">
<xsd:sequence>
<xsd:element name="name"
type="xsd:string"
nillable="true"
minOccurs="1"
maxOccurs="1">
</xsd:element>
<xsd:element name="id"
type="xsd:int"
minOccurs="1"
maxOccurs="1">
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:schema>
=============================================================Actually imports will work in most cases, though some bug fixes have
been made since and will show up in future releases.
--Scott
In article <[email protected]>,
Bruce Stephens <[email protected]> wrote:
Hello,
At the moment, we handle wsdl imports as done by SOAPBuilders Round
3, but not schema imports. Look for this in the upcoming release;
Contact Michael Bamford ([email protected]) if you would like
to be on the Beta.
Thanks,
Bruce
Sooleng Lau wrote:
Thank you for the response and info. What about schema import, is
it handled by weblogic 7.0 at the moment ? What is the upcoming
release, is it WebLogic 7.1 ?
Thank you.
Soo Leng
Bruce Stephens <[email protected]> wrote:
Hello,
Schema include is a known problem that will be corrected in the upcoming
release.
The workaround at this point is the cut and paste :-( you described.
Bruce
Sooleng Lau wrote:
Hi
I am currently using WebLogic 7.0. I was trying to use ant autotypeto generate
java classes based on a schema. I ran into a problem that the autotypedoes not
seem to include the other schema files listed with xsd:include. I couldonly get
around the problem by literally copy and paste the complex types definitioninto
the calling schema file. Below are the two schemas that illustratethe problem.
x.xsd includes y.xsd but however the EmployeeBean listed in y.xsd resultsin a
unresolve type with autotype. Problem only goes away if EmployeeBeandefinition
is listed in x.xsd.
Any help is much appreciated.
==========================================================
x.xsd
==========================================================
<?xml version="1.0" encoding="utf-8" standalone="no"?>
<xsd:schema xmlns:ofx="http://ofx.net/v3.0"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
targetNamespace="http://ofx.net/v3.0">
<xsd:include schemaLocation="y.xsd" />
<xsd:complexType name="Company">
<xsd:sequence>
<xsd:element name="XYZ" type="ofx:EmployeeBean" />
</xsd:sequence>
</xsd:complexType>
</xsd:schema>
==========================================================
y.xsd
==========================================================
<?xml version="1.0" encoding="utf-8" standalone="no"?>
<xsd:schema targetNamespace="http://ofx.net/v3.0"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:ofx="http://ofx.net/v3.0">
<xsd:complexType name="EmployeeBean">
<xsd:sequence>
<xsd:element name="name"
type="xsd:string"
nillable="true"
minOccurs="1"
maxOccurs="1">
</xsd:element>
<xsd:element name="id"
type="xsd:int"
minOccurs="1"
maxOccurs="1">
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:schema>
============================================================= -
hi
i have a need wherein i need to create/host jax-ws webservice ( starting from wsdl) and in that service translate the xml using xsl to a different structure and call another webservice hosted to another server ( non-weblogic).
so my approach is as soon as request comes to the service impl, i marshal the object to a xml then apply the required xsl transformation and then unmarshal the transformed xml to the object which can be used to trigger another webservice.
This approach works fine for the xmls without list tags/unbounded elements , however it gives marshal exception whenever the xmls has list/unbounded elements.
i am using jaxb and jax-ws generated class for marshalling and unmarshalling.
so need some help on how to deal in this scenario?
any help is appreciatedhi
i have a need wherein i need to create/host jax-ws webservice ( starting from wsdl) and in that service translate the xml using xsl to a different structure and call another webservice hosted to another server ( non-weblogic).
so my approach is as soon as request comes to the service impl, i marshal the object to a xml then apply the required xsl transformation and then unmarshal the transformed xml to the object which can be used to trigger another webservice.
This approach works fine for the xmls without list tags/unbounded elements , however it gives marshal exception whenever the xmls has list/unbounded elements.
i am using jaxb and jax-ws generated class for marshalling and unmarshalling.
so need some help on how to deal in this scenario?
any help is appreciated -
Help!: ERASED BADI generated class
Hello, thank you for Reading.
It seems that I have erased the SAP generated class for a BADI (CL_EX_FI_TAX_BADI_016), all other objects are still right, when verifying the BADI in SE18 message is: class CL_EX_FI_TAX_BADI_016 does not exist.
Also in SE80 the class BADI is not present in inside its packet.
All implementations of the BADI are actives and gives "OK" when verified, it seems that only the main class is erased.
Don't know what could I have done!!!! :-( , but I did again in quality machine when trying to fix!!!
Please could anybody help me, to recover or regenerate the class in both machines/environtments?
Thank you in advance
JoanHi,
Please go through the SAP Note 1109827 - BADI regeneration which can solve your problem by regenerating the BADI.
steps :
Regenerate the BAdI to solve the problem.
1)Execute transaction se18
2)Enter the BAdI name
3)Click on the Menu option 'utilities' and in the drop down on the 'regeneration' option.
Thanks.,
Kishor.
Maybe you are looking for
-
I really need help with this question. Can someone please shed some light on this subject.
-
Install Oracle client 9.2.0.1 on AIX 5L
Hell'o, I have a problem while I try to install the client client 9.2.0.1 on AIX 5L. I first installed (custom installation): - network utilities - database utilities - sqlplus - jdbc/oci interface the installation is ok with thisThen I want to add:
-
Statistical posting objects needed?
Hello, Do you any have experience that you have many statistical postings to different co-objects. I have a need for following type of posting: Account CostCenter Int.Order *Need one more? *Stat.post.to CC. One more needed is kind of "
-
Cisco Prime Infrastructure 1.4 SNMP Traps are not converted into Alarms
Hi everybody, I just configured SNMP Traps on a Cisco Catalyst 3750-x to send to our Cisco Prime Infrastructure 1.4 Appliance. Now I forced the Switch to send some traps (Power off a Power Supply, Interface errdisable). The only events I see in Alarm
-
Disable the Remote Management Service?
I know this is "Why would anyone want to do this" question but we are having conflicting issues in one of our labs between NetSupport and Zenworks when trying to run Adobe Flash. NetSupport is a tool that quite a few of our lab teachers use, it gives