Web Services.........XML schema of operation parameter?
This is a generic question :)
If my implementation fucntion is accepting a XML how can we embed the schema of the input XML in the WSDL so that it can be discovered by user/client?
Is it possible to define the input XML schema in the element binding? and how?
In contrast if the implementation function is accepting primitive types as input data , the how does the user/client encode(XML marshall) the information in his post or soap message so as to be understood by the web service.
Or
the user can directly write a client program and pass primitive parameters,marshall unmarshalling is done automatically?
No need to worry about how the data is carried in the post and soap messages?
Also what are the differrent ways in which a web service can be used and consumed?
If the user doesnot want to write a client program, but directly pass an http post or soap message, how will the user know how to write the POST/SOAP message in appropirate format(with the rigth XML format in the post body/soap message)!
Hello,
There's not one. The primary vision for the web-services.xml file
was/is to be a linkage between wsdl/soap and the j2ee environment. It
was not intended to be a starting point for building an application, but
a semi-private intermediary.
HTHs,
Bruce
Toni Nykanen wrote:
>
Hi there!
I'm just curious to know whether there exists any dtd or schema
for wls 7.x web-services.xml file?
The diagram in
http://e-docs.bea.com/wls/docs70/webserv/wsp.html#1001373
shows one order for the contents of the web-service element,
whereas the examples reflect another (being types,
type-mapping, components, operations).
Why are the example web-services.xml not tagged with the
information of the location of the schema?
Of course building web-services.xml manually is not the first
thing to try, but since the contents are documented and since
it gives the best control over the process, it makes sense.
Similar Messages
-
Process Web Service - XML Schema
Hi
I'm new to ALBPM and currently trying to learn about exposing a Process as a WebService. Specifically is it possible to use a XML Schema defined in the Catalog as an argument to the process Web Service? I've tried this and found the generated WSDL didn't include the Schema in the operation. This was using the Process Web Service menu item.
The Fast Trak codes sample passes in XML as a String and parses it back into an XMLObject in Pbl. Is this the best practice way to do it?
// Convert XML String to XML Object
load orderXML
using xmlText = orderRequest
Is there a sample project on dev2dev that shows an alternative approach using a Schema?
thanks
BenI'm new to web services, but we are currently
implementing a number of Web Services that all take
as arguments a single parameter which is an XMLBean,
which has been generated by a XML Schema.
What I find surprising is that when I submit a SOAP
message to the Web Service (through the http Web
Service Tester inside eclipse), I can send any valid
XML without getting a SOAP fault. Is there a way on
the Web Service that I want the XML submitted to be
validated against the XML Schema for that parameter?
Bit surprised I have to implement my own input
argument validation, and there doesn't appear to be a
standard way to do this. I must be missing soemthing
surely? Why else would the Schema be in the WSDL?
Cheers
JohnHas anyone found an answer to this, we have the same issue? -
Nice parameter names generation in web-services.xml
Hi
My session bean has explicit parameter names such as:
public void createCustomer(String name, String address, String telephoneNumber);
But inside web-services.xml for his operation, 'servicegen' generates parameters
name 'string, string0, string1'. Composing the xml becomes a tedious job!
Is there a way to have this file generated automatically but with the original
parameter names?
Thanks for the help,
guyCan source2wsdd be applied to an EJB implementation - the doc mentions only Java class-implemented web service - has this been
fixed or being fixed in the next wls 7 service pack.
http://edocs.bea.com/wls/docs70/webserv/assemble.html#1056639
Thanks.
Darma
Shridhar Mysore wrote:
In WLS 7.0.1 onwards, using "source2wsdd" ant task (quo vide http://e-docs.bea.com/wls/docs70/webserv/anttasks.html#1080421)
you would be able to preserve the parameter names.
For instance, if you do :
<source2wsdd
javaSource="MyService.java"
ddFile="web-services.xml"
typesInfo="temp_dir/WEB-INF/classes/types.xml"
serviceURI="/MyService" >
<classpath>
<pathelement path="temp_dir/WEB-INF/classes"/>
<pathelement path="${java.class.path}"/>
</classpath>
</source2wsdd>
Then, the signature of a method in the backend component,
public void testMethod( int a, float fval, String name ){
would get translated mapped inside web-services.xml as :
- <operation component="MyService" name="testMethod" method="testMethod">
- <params>
<param name="a" class-name="int" type="parms:int" style="in" xmlns:parms="http://www.w3.org/2001/XMLSchema"
location="body" />
<param name="fval" class-name="float" type="parms:float" style="in" xmlns:parms="http://www.w3.org/2001/XMLSchema"
location="body" />
<param name="name" class-name="java.lang.String" type="parms:string" style="in"
xmlns:parms="http://www.w3.org/2001/XMLSchema" location="body" />
</params>
</operation>
where you would see that the parameter names are being preserved.
Regards
Shridhar
"Guy Deffaux" <[email protected]> wrote:
Hi
My session bean has explicit parameter names such as:
public void createCustomer(String name, String address, String telephoneNumber);
But inside web-services.xml for his operation, 'servicegen' generates
parameters
name 'string, string0, string1'. Composing the xml becomes a tedious
job!
Is there a way to have this file generated automatically but with the
original
parameter names?
Thanks for the help,
guy -
Fault elt in web-services.xml NOT WORKING
We are trying to capture an invalid message coming into our service before our
service actually processes it. Per WLS7 documentation, it provides the ability
to add a <fault> elt under the <params> elt in web-services.xml to perform that.
Here's how the operations portion of our web-services.xml looks like:
<operations>
<operation method="echo(java.lang.String)" component="jcComp0" name="echo"
handler-chain="diagnosticChain">
<params>
<param location="body" class-name="java.lang.String" style="in" name="echoString"
xmlns:xsd="http://www.w3.org/2001/XMLSchema" type="xsd:string">
</param>
<return-param location="body" class-name="java.lang.String" name="Result"
xmlns:xsd="http://www.w3.org/2001/XMLSchema" type="xsd:string">
</return-param>
<fault name="InvalidMessageException" class-name="com.gmacfs.routeone.diagnostic.InvalidMessageException"/>
</params>
</operation>
</operations>
However, when we tried doing that, we got a BIG set of exception while trying
to build our client. It looks as follows:
client:
[clientgen] Generating client jar for diagnostic.ear ...
[clientgen] Could not read Web Service deployment descriptor
[clientgen] at weblogic.ant.taskdefs.webservices.clientgen.EARClientGen.run(EARClientGen.java:112)
[clientgen] at weblogic.ant.taskdefs.webservices.clientgen.ClientGenTask.execute(ClientGenTask.java:270)
[clientgen] at org.apache.tools.ant.Task.perform(Task.java:217)
[clientgen] at org.apache.tools.ant.Target.execute(Target.java:164)
[clientgen] at org.apache.tools.ant.Target.performTasks(Target.java:182)
[clientgen] at org.apache.tools.ant.Project.executeTarget(Project.java:601)
[clientgen] at org.apache.tools.ant.Project.executeTargets(Project.java:560)
[clientgen] at org.apache.tools.ant.Main.runBuild(Main.java:454)
[clientgen] at org.apache.tools.ant.Main.start(Main.java:153)
[clientgen] at org.apache.tools.ant.Main.main(Main.java:176)
[clientgen] --- Nested Exception ---
[clientgen] Could not read Web Service deployment descriptor
[clientgen] at weblogic.ant.taskdefs.webservices.clientgen.EARClientGen.getWebServiceDD(EARClientGen.java:332)
[clientgen] at weblogic.ant.taskdefs.webservices.clientgen.EARClientGen.run(EARClientGen.java:110)
[clientgen] at weblogic.ant.taskdefs.webservices.clientgen.ClientGenTask.execute(ClientGenTask.java:270)
[clientgen] at org.apache.tools.ant.Task.perform(Task.java:217)
[clientgen] at org.apache.tools.ant.Target.execute(Target.java:164)
[clientgen] at org.apache.tools.ant.Target.performTasks(Target.java:182)
[clientgen] at org.apache.tools.ant.Project.executeTarget(Project.java:601)
[clientgen] at org.apache.tools.ant.Project.executeTargets(Project.java:560)
[clientgen] at org.apache.tools.ant.Main.runBuild(Main.java:454)
[clientgen] at org.apache.tools.ant.Main.start(Main.java:153)
[clientgen] at org.apache.tools.ant.Main.main(Main.java:176)
[clientgen] --- Nested Exception ---
[clientgen] weblogic.webservice.dd.DDProcessingException: Could not find required
attribute "type" for element <fault> (Line 28, Column 8)
[clientgen] at weblogic.webservice.dd.ParsingHelper.getRequiredAttribute(ParsingHelper.java:287)
[clientgen] at weblogic.webservice.dd.DDLoader.processFaultElement(DDLoader.java:1195)
[clientgen] at weblogic.webservice.dd.DDLoader.processFaultElements(DDLoader.java:1166)
[clientgen] at weblogic.webservice.dd.DDLoader.processParamsElement(DDLoader.java:1004)
[clientgen] at weblogic.webservice.dd.DDLoader.processOperationElement(DDLoader.java:977)
[clientgen] at weblogic.webservice.dd.DDLoader.processOperationElements(DDLoader.java:853)
[clientgen] at weblogic.webservice.dd.DDLoader.processOperationsElement(DDLoader.java:841)
[clientgen] at weblogic.webservice.dd.DDLoader.processWebServiceElement(DDLoader.java:378)
[clientgen] at weblogic.webservice.dd.DDLoader.processWebServiceElements(DDLoader.java:283)
[clientgen] at weblogic.webservice.dd.DDLoader.processWebServicesElement(DDLoader.java:271)
[clientgen] at weblogic.webservice.dd.DDLoader.load(DDLoader.java:249)
[clientgen] at weblogic.webservice.util.WebServiceWarFile.getWSDD(WebServiceWarFile.java:79)
[clientgen] at weblogic.ant.taskdefs.webservices.clientgen.EARClientGen.getWebServiceDD(EARClientGen.java:330)
[clientgen] at weblogic.ant.taskdefs.webservices.clientgen.EARClientGen.run(EARClientGen.java:110)
[clientgen] at weblogic.ant.taskdefs.webservices.clientgen.ClientGenTask.execute(ClientGenTask.java:270)
[clientgen] at org.apache.tools.ant.Task.perform(Task.java:217)
[clientgen] at org.apache.tools.ant.Target.execute(Target.java:164)
[clientgen] at org.apache.tools.ant.Target.performTasks(Target.java:182)
[clientgen] at org.apache.tools.ant.Project.executeTarget(Project.java:601)
[clientgen] at org.apache.tools.ant.Project.executeTargets(Project.java:560)
[clientgen] at org.apache.tools.ant.Main.runBuild(Main.java:454)
[clientgen] at org.apache.tools.ant.Main.start(Main.java:153)
[clientgen] at org.apache.tools.ant.Main.main(Main.java:176)
[clientgen] --------------- nested within: ------------------
[clientgen] weblogic.webservice.util.WebServiceJarException: Could not load deployment
descriptor - with nested exception:
[clientgen] [weblogic.webservice.dd.DDProcessingException: Could not find required
attribute "type" for element <fault> (Line 28, Column 8)]
[clientgen] at weblogic.webservice.util.WebServiceWarFile.getWSDD(WebServiceWarFile.java:81)
[clientgen] at weblogic.ant.taskdefs.webservices.clientgen.EARClientGen.getWebServiceDD(EARClientGen.java:330)
[clientgen] at weblogic.ant.taskdefs.webservices.clientgen.EARClientGen.run(EARClientGen.java:110)
[clientgen] at weblogic.ant.taskdefs.webservices.clientgen.ClientGenTask.execute(ClientGenTask.java:270)
[clientgen] at org.apache.tools.ant.Task.perform(Task.java:217)
[clientgen] at org.apache.tools.ant.Target.execute(Target.java:164)
[clientgen] at org.apache.tools.ant.Target.performTasks(Target.java:182)
[clientgen] at org.apache.tools.ant.Project.executeTarget(Project.java:601)
[clientgen] at org.apache.tools.ant.Project.executeTargets(Project.java:560)
[clientgen] at org.apache.tools.ant.Main.runBuild(Main.java:454)
[clientgen] at org.apache.tools.ant.Main.start(Main.java:153)
[clientgen] at org.apache.tools.ant.Main.main(Main.java:176)
BUILD FAILED
Anybody has any ideas?
Thanks much,
samiManoj,
Thanks a lot, THAT DID IT... two very helpful hints from you in a row.
By the way, one thing worth mentioning is that the Weblogic documentation that
we explored did not have enough information about that issue.
Thanks again.
sami
"manoj cheenath" <[email protected]> wrote:
Buried deep in the stack trace, is this little
detail:
Could not find required
attribute "type" for element <fault> (Line 28, Column 8)
So the correct DD should look something like:
<fault type="typeNS:string"
xmlns:typeNS="http://www.w3.org/2001/XMLSchema"
class-name="tutorial.sample9.HelloWorldException"
name="HelloWorldException">
</fault>
Also, check out this example:
http://manojc.com/?sample9
There is a know problem: WLS can not handle
exceptions that contain complex data types.
This will be fixed in SP1.
Regards,
-manoj
http://manojc.com
"sami titi" <[email protected]> wrote in message
news:[email protected]...
We are trying to capture an invalid message coming into our servicebefore
our
service actually processes it. Per WLS7 documentation, it providesthe
ability
to add a <fault> elt under the <params> elt in web-services.xml toperform
that.
Here's how the operations portion of our web-services.xml looks like:
<operations>
<operation method="echo(java.lang.String)" component="jcComp0"name="echo"
handler-chain="diagnosticChain">
<params>
<param location="body" class-name="java.lang.String" style="in"name="echoString"
xmlns:xsd="http://www.w3.org/2001/XMLSchema" type="xsd:string">
</param>
<return-param location="body" class-name="java.lang.String"name="Result"
xmlns:xsd="http://www.w3.org/2001/XMLSchema" type="xsd:string">
</return-param>
<fault name="InvalidMessageException"class-name="com.gmacfs.routeone.diagnostic.InvalidMessageException"/>
</params>
</operation>
</operations>
However, when we tried doing that, we got a BIG set of exception whiletrying
to build our client. It looks as follows:
client:
[clientgen] Generating client jar for diagnostic.ear ...
[clientgen] Could not read Web Service deployment descriptor
[clientgen] atweblogic.ant.taskdefs.webservices.clientgen.EARClientGen.run(EARClientGen.ja
va:112)
[clientgen] atweblogic.ant.taskdefs.webservices.clientgen.ClientGenTask.execute(ClientGenT
ask.java:270)
[clientgen] at org.apache.tools.ant.Task.perform(Task.java:217)
[clientgen] at org.apache.tools.ant.Target.execute(Target.java:164)
[clientgen] atorg.apache.tools.ant.Target.performTasks(Target.java:182)
[clientgen] atorg.apache.tools.ant.Project.executeTarget(Project.java:601)
[clientgen] atorg.apache.tools.ant.Project.executeTargets(Project.java:560)
[clientgen] at org.apache.tools.ant.Main.runBuild(Main.java:454)
[clientgen] at org.apache.tools.ant.Main.start(Main.java:153)
[clientgen] at org.apache.tools.ant.Main.main(Main.java:176)
[clientgen] --- Nested Exception ---
[clientgen] Could not read Web Service deployment descriptor
[clientgen] atweblogic.ant.taskdefs.webservices.clientgen.EARClientGen.getWebServiceDD(EAR
ClientGen.java:332)
[clientgen] atweblogic.ant.taskdefs.webservices.clientgen.EARClientGen.run(EARClientGen.ja
va:110)
[clientgen] atweblogic.ant.taskdefs.webservices.clientgen.ClientGenTask.execute(ClientGenT
ask.java:270)
[clientgen] at org.apache.tools.ant.Task.perform(Task.java:217)
[clientgen] at org.apache.tools.ant.Target.execute(Target.java:164)
[clientgen] atorg.apache.tools.ant.Target.performTasks(Target.java:182)
[clientgen] atorg.apache.tools.ant.Project.executeTarget(Project.java:601)
[clientgen] atorg.apache.tools.ant.Project.executeTargets(Project.java:560)
[clientgen] at org.apache.tools.ant.Main.runBuild(Main.java:454)
[clientgen] at org.apache.tools.ant.Main.start(Main.java:153)
[clientgen] at org.apache.tools.ant.Main.main(Main.java:176)
[clientgen] --- Nested Exception ---
[clientgen] weblogic.webservice.dd.DDProcessingException: Could notfind
required
attribute "type" for element <fault> (Line 28, Column 8)
[clientgen] atweblogic.webservice.dd.ParsingHelper.getRequiredAttribute(ParsingHelper.java
:287)
[clientgen] atweblogic.webservice.dd.DDLoader.processFaultElement(DDLoader.java:1195)
[clientgen] atweblogic.webservice.dd.DDLoader.processFaultElements(DDLoader.java:1166)
[clientgen] atweblogic.webservice.dd.DDLoader.processParamsElement(DDLoader.java:1004)
[clientgen] atweblogic.webservice.dd.DDLoader.processOperationElement(DDLoader.java:977)
[clientgen] atweblogic.webservice.dd.DDLoader.processOperationElements(DDLoader.java:853)
[clientgen] atweblogic.webservice.dd.DDLoader.processOperationsElement(DDLoader.java:841)
[clientgen] atweblogic.webservice.dd.DDLoader.processWebServiceElement(DDLoader.java:378)
[clientgen] atweblogic.webservice.dd.DDLoader.processWebServiceElements(DDLoader.java:283)
[clientgen] atweblogic.webservice.dd.DDLoader.processWebServicesElement(DDLoader.java:271)
[clientgen] at weblogic.webservice.dd.DDLoader.load(DDLoader.java:249)
[clientgen] atweblogic.webservice.util.WebServiceWarFile.getWSDD(WebServiceWarFile.java:79
[clientgen] atweblogic.ant.taskdefs.webservices.clientgen.EARClientGen.getWebServiceDD(EAR
ClientGen.java:330)
[clientgen] atweblogic.ant.taskdefs.webservices.clientgen.EARClientGen.run(EARClientGen.ja
va:110)
[clientgen] atweblogic.ant.taskdefs.webservices.clientgen.ClientGenTask.execute(ClientGenT
ask.java:270)
[clientgen] at org.apache.tools.ant.Task.perform(Task.java:217)
[clientgen] at org.apache.tools.ant.Target.execute(Target.java:164)
[clientgen] atorg.apache.tools.ant.Target.performTasks(Target.java:182)
[clientgen] atorg.apache.tools.ant.Project.executeTarget(Project.java:601)
[clientgen] atorg.apache.tools.ant.Project.executeTargets(Project.java:560)
[clientgen] at org.apache.tools.ant.Main.runBuild(Main.java:454)
[clientgen] at org.apache.tools.ant.Main.start(Main.java:153)
[clientgen] at org.apache.tools.ant.Main.main(Main.java:176)
[clientgen] --------------- nested within: ------------------
[clientgen] weblogic.webservice.util.WebServiceJarException: Couldnot
load deployment
descriptor - with nested exception:
[clientgen] [weblogic.webservice.dd.DDProcessingException: Could not
find>required>> attribute "type" for element <fault> (Line 28, Column 8)
[clientgen] atweblogic.webservice.util.WebServiceWarFile.getWSDD(WebServiceWarFile.java:81
[clientgen] atweblogic.ant.taskdefs.webservices.clientgen.EARClientGen.getWebServiceDD(EAR
ClientGen.java:330)
[clientgen] atweblogic.ant.taskdefs.webservices.clientgen.EARClientGen.run(EARClientGen.ja
va:110)
[clientgen] atweblogic.ant.taskdefs.webservices.clientgen.ClientGenTask.execute(ClientGenT
ask.java:270)
[clientgen] at org.apache.tools.ant.Task.perform(Task.java:217)
[clientgen] at org.apache.tools.ant.Target.execute(Target.java:164)
[clientgen] atorg.apache.tools.ant.Target.performTasks(Target.java:182)
[clientgen] atorg.apache.tools.ant.Project.executeTarget(Project.java:601)
[clientgen] atorg.apache.tools.ant.Project.executeTargets(Project.java:560)
[clientgen] at org.apache.tools.ant.Main.runBuild(Main.java:454)
[clientgen] at org.apache.tools.ant.Main.start(Main.java:153)
[clientgen] at org.apache.tools.ant.Main.main(Main.java:176)
BUILD FAILED
Anybody has any ideas?
Thanks much,
sami -
Web service XML use with Schema
Hi!
I have a Webservice working ok and a can see the xml, but, the after process for read this data(I do it trought pbl) take too time, then i go to try use of schema, as follow structure:
<?xml version="1.0" encoding="UTF-8" ?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<xsd:simpleType name="nombres" type="xsd:string"/>
<xsd:simpleType name="paterno" type="xsd:string"/>
<xsd:simpleType name="materno" type="xsd:string"/>
<xsd:simpleType name="email" type="xsd:string"/>
<xsd:simpleType name="codigo" type="xsd:string"/>
<xsd:simpleType name="vigencia" type="xsd:string"/>
<xsd:simpleType name="fecIni" type="xsd:string"/>
<xsd:simpleType name="fecTer" type="xsd:string"/>
<xsd:simpleType name="codCargo" type="xsd:string"/>
<xsd:simpleType name="codGrado" type="xsd:string"/>
<xsd:simpleType name="codPuesto" type="xsd:string"/>
<xsd:simpleType name="codRepart" type="xsd:string"/>
<xsd:simpleType name="codOrganismo" type="xsd:string"/>
<xsd:simpleType name="descCargo" type="xsd:string"/>
<xsd:simpleType name="descEscalafon" type="xsd:string"/>
<xsd:simpleType name="descReparticion" type="xsd:string"/>
<xsd:simpleType name="descEstamento" type="xsd:string"/>
<xsd:simpleType name="descJerarquia" type="xsd:string"/>
<xsd:group name="nombramientos">
<xsd:sequence>
<xsd:element name="codigo" type="codigo"/>
<xsd:element name="vigencia" type="vigencia"/>
<xsd:element name="fecIni" type="fecIni"/>
<xsd:element name="fecTer" type="fecTer"/>
<xsd:element name="codCargo" type="codCargo"/>
<xsd:element name="codGrado" type="codGrado"/>
<xsd:element name="codPuesto" type="codPuesto"/>
<xsd:element name="codRepart" type="codRepart"/>
<xsd:element name="codOrganismo" type="codOrganismo"/>
<xsd:element name="descCargo" type="descCargo"/>
<xsd:element name="descEscalafon" type="descEscalafon"/>
<xsd:element name="descReparticion" type="descReparticion"/>
<xsd:element name="descEstamento" type="descEstamento"/>
<xsd:element name="descJerarquia" type="descJerarquia"/>
</xsd:sequence>
</xsd:group>
<xsd:complexType name="Usuario">
<xsd:sequence>
<xsd:choice>
<xsd:element name="nombres" type="nombres"/>
<xsd:element name="paterno" type="paterno"/>
<xsd:element name="materno" type="materno"/>
<xsd:element name="email" type="email"/>
<xsd:group ref="nombramientos"/>
</xsd:choice>
</xsd:sequence>
</xsd:complexType>
<xsd:element name="usuario" type="Usuario"/>
</xsd:schema>
... and the xml i using as the next:
<usuario>
<nombres>Oscar Hernan</nombres>
<paterno>Pozo</paterno>
<materno>Ortiz</materno>
<email>[email protected]</email>
<nombramientos class="list">
<nombramiento>
<codigo>A110401412002</codigo>
<vigencia>1</vigencia>
<fecIni>2002-01-01 00:00:00.0</fecIni>
<fecTer>2002-12-31 00:00:00.0</fecTer>
<codCargo>N3A075</codCargo>
<codGrado>13</codGrado>
<codPuesto>A22004</codPuesto>
<codRepart>11040501</codRepart>
<codOrganismo>11040000</codOrganismo>
<descCargo>ANALISTA COMPUTACIONAL</descCargo>
<descEscalafon>N3A</descEscalafon>
<descReparticion>Dirección de Servicios de Tecnologías de Información</descReparticion>
<descEstamento>A</descEstamento>
<descJerarquia>Técnica</descJerarquia>
</nombramiento>
<nombramiento>
<codigo>A120200011978</codigo>
<vigencia>1</vigencia>
<fecIni>1978-09-15 00:00:00.0</fecIni>
<fecTer>2099-12-31 00:00:00.0</fecTer>
<codCargo>A2A001</codCargo>
<codGrado>05</codGrado>
<codPuesto>001767</codPuesto>
<codRepart>19012061</codRepart>
<codOrganismo>12060000</codOrganismo>
<descCargo>Académico Prof. Asociado</descCargo>
<descEscalafon>A2A</descEscalafon>
<descReparticion>Aporte Institucional Ciencias Físicas </descReparticion>
<descEstamento>A</descEstamento>
<descJerarquia>Prof. Asociado - Categ. Academica Ord.</descJerarquia>
</nombramiento>
</nombramientos>
</usuario>
As you see, i'm try retrieve data "nombramientos" in a group, but que schema is not charging in albpm with this structure.
A need let "nombramientos" tag in a group to use it as correct.
Please.. if any body can help me.
Nathan BernalI'm new to web services, but we are currently
implementing a number of Web Services that all take
as arguments a single parameter which is an XMLBean,
which has been generated by a XML Schema.
What I find surprising is that when I submit a SOAP
message to the Web Service (through the http Web
Service Tester inside eclipse), I can send any valid
XML without getting a SOAP fault. Is there a way on
the Web Service that I want the XML submitted to be
validated against the XML Schema for that parameter?
Bit surprised I have to implement my own input
argument validation, and there doesn't appear to be a
standard way to do this. I must be missing soemthing
surely? Why else would the Schema be in the WSDL?
Cheers
JohnHas anyone found an answer to this, we have the same issue? -
Web Service XML Input Arguments Schema Validation
I'm new to web services, but we are currently implementing a number of Web Services that all take as arguments a single parameter which is an XMLBean, which has been generated by a XML Schema.
What I find surprising is that when I submit a SOAP message to the Web Service (through the http Web Service Tester inside eclipse), I can send any valid XML without getting a SOAP fault. Is there a way on the Web Service that I want the XML submitted to be validated against the XML Schema for that parameter?
Bit surprised I have to implement my own input argument validation, and there doesn't appear to be a standard way to do this. I must be missing soemthing surely? Why else would the Schema be in the WSDL?
Cheers
JohnI'm new to web services, but we are currently
implementing a number of Web Services that all take
as arguments a single parameter which is an XMLBean,
which has been generated by a XML Schema.
What I find surprising is that when I submit a SOAP
message to the Web Service (through the http Web
Service Tester inside eclipse), I can send any valid
XML without getting a SOAP fault. Is there a way on
the Web Service that I want the XML submitted to be
validated against the XML Schema for that parameter?
Bit surprised I have to implement my own input
argument validation, and there doesn't appear to be a
standard way to do this. I must be missing soemthing
surely? Why else would the Schema be in the WSDL?
Cheers
JohnHas anyone found an answer to this, we have the same issue? -
Web-services.xml, dtd or xml schema?
Hi there!
I'm just curious to know whether there exists any dtd or schema
for wls 7.x web-services.xml file?
The diagram in
http://e-docs.bea.com/wls/docs70/webserv/wsp.html#1001373
shows one order for the contents of the web-service element,
whereas the examples reflect another (being types,
type-mapping, components, operations).
Why are the example web-services.xml not tagged with the
information of the location of the schema?
Of course building web-services.xml manually is not the first
thing to try, but since the contents are documented and since
it gives the best control over the process, it makes sense.Hello,
There's not one. The primary vision for the web-services.xml file
was/is to be a linkage between wsdl/soap and the j2ee environment. It
was not intended to be a starting point for building an application, but
a semi-private intermediary.
HTHs,
Bruce
Toni Nykanen wrote:
>
Hi there!
I'm just curious to know whether there exists any dtd or schema
for wls 7.x web-services.xml file?
The diagram in
http://e-docs.bea.com/wls/docs70/webserv/wsp.html#1001373
shows one order for the contents of the web-service element,
whereas the examples reflect another (being types,
type-mapping, components, operations).
Why are the example web-services.xml not tagged with the
information of the location of the schema?
Of course building web-services.xml manually is not the first
thing to try, but since the contents are documented and since
it gives the best control over the process, it makes sense. -
Web-services.xml, why is security not enforced (format improved)
<pre>
Hi,
Sorry about the lack of formatting in previous post.
Running weblogic 8.1SP5.
Im having problems with the message style security, it doesn't seem to be enforced by weblogic.
The intention of web-services.xml (below) is that weblogic should authenticate the user according to credential info in the request header.
The console webservice testpage seem OK, it has user and password input boxes. But invocations fail with an obscure message involving
AssertionError: Bad password type: wsse:PasswordText
A simple Axis based client (see below) with no security tags in the header can invoke the service with no problems, would expect it to fail on athentication.
Did I miss something in web-services.xml or does something general need to be set up in the server for this to work as intended?
I am pulling my hair out on this one so any help will be greatly appreciated.
Rgds.
web-services.xml looks like this:
<security>
<user>
<name>test_user</name>
<password>test_password</password>
</user>
<spec:SecuritySpec xmlns:spec="http://www.openuri.org/2002/11/wsse/spec"
Namespace="http://schemas.xmlsoap.org/ws/2002/07/secext"
Id="_mySpec">
<spec:UsernameTokenSpec xmlns:wsse="http://schemas.xmlsoap.org/ws/2002/07/secext"
PasswordType="wsse:PasswordText">
</spec:UsernameTokenSpec>
</spec:SecuritySpec>
</security>
<components>
<stateless-ejb name="CaseConverter">
<jndi-name path="CaseConverter"></jndi-name>
</stateless-ejb>
</components>
<operations xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<operation
component="CaseConverter"
name="convertToUpper"
method="convertToUpper"
in-security-spec="_mySpec"
>
The client looks like this (Axis based):
URL endpoint = new URL("http://127.0.0.1:7001/WebModule/CaseConverter");
Service service = new Service();
Call call = (Call)service.createCall();
call.setTargetEndpointAddress(endpoint);
call.setOperationName("convertToUpper");
call.addParameter("inputString",XMLType.XSD_STRING,ParameterMode.IN);
call.setReturnType(XMLType.XSD_STRING);
String result = (String) call.invoke(new Object[] { "hello!" });
System.out.println("Result: " + result);
</pre>Hi
I am also getting the same error. if anybody has some solution, pl. tell us -
Web-services.xml, why is security not enforced
Hi,
Running weblogic 8.1SP5.
Im having problems with the message style security, it doesn't seem to be enforced by weblogic.
The intention of web-services.xml (below) is that weblogic should authenticate the user according to credential info in the request header.
The console webservice testpage seem OK, it has user and password input boxes. But invocations fail with an obscure message involving
<b>AssertionError: Bad password type: wsse:PasswordText</b>
A simple Axis based client (see below) with no security tags in the header can invoke the service with no problems, would expect it to fail on athentication.
Did I miss something in web-services.xml or does something general need to be set up in the server for this to work as intended?
I am pulling my hair out on this one so any help will be greatly appreciated.
Rgds.
web-services.xml looks like this:
<security>
<user>
<name>test_user</name>
<password>test_password</password>
</user>
<spec:SecuritySpec xmlns:spec="http://www.openuri.org/2002/11/wsse/spec"
Namespace="http://schemas.xmlsoap.org/ws/2002/07/secext"
Id="_mySpec">
<spec:UsernameTokenSpec xmlns:wsse="http://schemas.xmlsoap.org/ws/2002/07/secext"
PasswordType="wsse:PasswordText">
</spec:UsernameTokenSpec>
</spec:SecuritySpec>
</security>
<components>
<stateless-ejb name="CaseConverter">
<jndi-name path="CaseConverter"></jndi-name>
</stateless-ejb>
</components>
<operations xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<operation
component="CaseConverter"
name="convertToUpper"
method="convertToUpper"
in-security-spec="_mySpec"
>
The client looks like this (Axis based):
URL endpoint = new URL("http://127.0.0.1:7001/WebModule/CaseConverter");
Service service = new Service();
Call call = (Call)service.createCall();
call.setTargetEndpointAddress(endpoint);
call.setOperationName("convertToUpper");
call.addParameter("inputString",XMLType.XSD_STRING,ParameterMode.IN);
call.setReturnType(XMLType.XSD_STRING);
String result = (String) call.invoke(new Object[] { "hello!" });
System.out.println("Result: " + result);
.......Hi
I am also getting the same error. if anybody has some solution, pl. tell us -
Error while inluding xsd:whiteSpace in web-services.xml
Hi,
i am trying to allow the xml attribute values to preserve the whiteSpace characters(tabs, line feeds, carriage returns etc...)
In web-services.xml i am adding
<xsd:complexContent>
<xsd:restriction base="xsd:string">
<xsd:attribute name="address">
<xsd:whiteSpace value="preserve"/>
</xsd:attribute>
</xsd:restriction>
</xsd:complexContent>
But i am getting a run time exception as
[weblogic.xml.schema.model.parser.XSDParseException: invalid element "xsd:whiteSpace" AT line 0, column 0: <['http://www.w3.org/2001/XMLSchema']:xsd:whiteSpace value="preserve">]
am i doing in a correct way?
Please suggest me.
Thanks
subba.weblogic server doesn't support some of the xsd features.
WebLogic Server does not support the following XML Schema features:
? Complex data type inheritance by restriction
? Union simple data types
? References to named model groups
? Nested content models in a single complex type
? Redefinition of declarations
? Identity constraints (key, keyref, unique)
? Nested XSD model groups with other content models at the same level.
There cannot be a modelgroup (say sequence) that contains another nested modelgroup (say choice), and a content element (say element). So, if a nested modelgroup is required, make sure that it contains only another model group and no other content element.
? Wildcards
but i didn't understand why its giving error for whiteSpace.
Can someone reply to this please,, its urgent for me.
thanks
subba. -
Web Service execution failed for operation: ReadLogFile
Hello,
im getting the following error message in almost all of my Diagnostic Agent log files:
[MAIJobObserver] ERROR occurred for metric collection
00000000000000000019[com.sap.smd.mai.model.collector.SAPControlWSCollector].
[EXCEPTION]
com.sap.smd.mai.model.collector.CollectorException:
[SAPControlWSCollector.collect] Web Service execution failed for operation:
ReadLogFile. Collector : [SAPControlWSCollector]
Id: 00000000000000000019,
SID: EPX, instance number:00
at
com.sap.smd.mai.model.collector.SAPControlWSCollector.collect(SAPControlWSCollector.java:200)
at
com.sap.smd.mai.job.MetricJobRunner.run(MetricJobRunner.java:25)
at
com.sap.smd.server.exec.TaskRunner.run(TaskRunner.java:46)
at
com.sap.smd.server.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:785)
at
java.lang.Thread.run(Thread.java:722)
Caused by: java.rmi.RemoteException:
Service call exception; nested exception is:
com.sap.engine.services.webservices.jaxrpc.exceptions.InvalidResponseCodeException:
Invalid Response Code: (401) Unauthorized. The requested URL
was:http://<hostname>:50013/SAPControl.cgi
I checked on SAP note 1563660 - sapcontrol, <sid>adm authorization issues (SUM) and confirmed, that ALL installations of the "sapuxuserchk" program are set with "chown root.sapsys" and "chmod u+s,o-rwx". I restarted the diagnostic Agent aftwards.
I also checked on host_profile an made sure, that the parameter "service/admin_users = daaadm" is set.
Still I get the above error messages, so I am at a loss what else to do...
A lot of thanks for your Support !
Best regards,
ThorstenHi Thorsten,
Please check the user used for registration of Diagnostic agent to Solution Manager has appropriate roles assigned (e.g. user SMD_ADMIN)
Also please update to latest patch of SAP Host agent and then try again.
Hope this helps
Thanks & Regards,
Nisha -
I'm implementing WS-SECURITY for my web service. The only service that I am enabling is the soap encryption. Furthermore, I only want to encrypt the request. I in the web-services.xml the operations specify the security spec to use for both the request and the response...
in-security-spec
out-security-spec
The docs say "If you do not specify this attribute, the default security specification, if it exists, is applied to the SOAP response. If there is no default security specification, then no message-level security is applied to the SOAP response."
My question is how do you disable the response if there is a default security spec.
thxxmllint is correct. Here's what the 1.1.3 XSD says (I put in the leading periods to fool the discussion board into preserving structure ):
. <xsd:element name="ITunesUDocument">
. . <xsd:complexType>
. . . <xsd:sequence>
. . . . <xsd:element ref="Version" minOccurs="1" maxOccurs="1"/>
. . . . <xsd:element ref="AddCourse" minOccurs="0"/>
. . . </xsd:sequence>
. . </xsd:complexType>
. </xsd:element>
If "minOccurs" or "maxOccurs" aren't specified in sequence elements, then they both default to "1". So the "minOccurs" and "maxOccurs" specifiers are redundant in the "Version" element specification…they'd be "1" anyway. Setting "minOccurs" to "0" means that you can omit the element in XML…but unless "maxOccurs" is set, than the most any element can appear in the sequence is once to be valid. "unbounded" can be used in "maxOccurs" to set no limit on the number of times it can appear in the sequence.
Recall that XML doesn't necessarily have to validate to "work". An XML validation is a contract between us and Apple…Apple promises that we can put at least one "AddCourse" in an "ITunesUDocument" and that is going to work, or our money back. But if we don't submit valid XML, it might still work…but there is no promise there either. It might work today, it might fail tomorrow. The iTunes U people have said, in various venues, that we should expect Apple to validate our XML…but nobody's perfect. It could be that Apple just missed this one…but we should still write code under the assumption that the XSD is being correctly applied and that our XML is being validated on Apple's end. That way, our code can never be "wrong". -
Web-services.xml handler chain
Hi All,
My question is this. I use servicegen ant task to generate the web-services.xml
file,
then I open the .ear file using winzip and edit the web-services.xml file to include
the handler-chain information. I have included the following information :
<handler-chains>
<handler-chain name="myChain">
<handler class-name="com.whatever.core.sec.iec.ejb.IECSOAPHandler">
<init-params>
<init-param name="logDirectory" value="C:/temp" />
<init-param name="severityLevel" value="verbose" />
</init-params>
</handler>
</handler-chain>
</handler-chains>
and then I include the following in the operation tag:
<operation method="batchResponseToPSS([B)" component="ejbcomp0" name="batchResponseToPSS"
handler-chain="myChain">
and the also following
<operation method="onlineResponseToPSS([B)" component="ejbcomp0" name="onlineResponseToPSS"
handler-chain="myChain">
Without the handler-chains element my app works fine.
My whole web-sercvices.xml is located at following location:
http://newsgroups.bea.com/cgi-bin/dnewsweb?cmd=article&group=weblogic.developer.interest.webservices&item=3921&utag=
Any insight will be appreciated.
Thanks
---Radhe
I am still not clear what error you are getting.
1. Are you saying that the handler is not getting
called?
2. or you are not able to invoke the web service
at all?
If it is 1 check the web-service.xml file of the ear
deployed. Make sure that your change is not overwritten
by servicegen.
If it is 2 then check the URL of the web service in
web-service.xml file and use a browser to get to
that URL.
Regards,
-manoj
http://manojc.com
"Radhe" <[email protected]> wrote in message
news:[email protected]...
>
Manoj,
Thanks for your reply. When I bring up the WLS, from the messages on theconsole,
it comes-up pretty cleanly. Theare are no error messages.
I looked into log files and their is nothing. This has surprised me.
I worked with some of my friends and they are clueless. I never thoughtto just
read SOAP Headers, that I have to go through so much pain.
Also part of my web-services.xml file is generated through servicegen,then I
crack open the .ear file strip the web-services.xml file, edit it and putit back.
>
IF there is some error I would have fixed it.
Does handler-chains in web-services.xml work, or it is some fiction, BEAmade
up. I am clueless where I am screwing it up.
Thanks
---Radhe
"manoj cheenath" <[email protected]> wrote:
Can you please post the error message?
This example may also help you:
http://www.manojc.com/?sample4
Regards,
-manoj
http://manojc.com
"Radhe" <[email protected]> wrote in message
news:[email protected]...
Hi All,
My question is this. I use servicegen ant task to generate theweb-services.xml
file,
then I open the .ear file using winzip and edit the web-services.xmlfile
to include
the handler-chain information. I have included the following
information
<handler-chains>
<handler-chain name="myChain">
<handler
class-name="com.whatever.core.sec.iec.ejb.IECSOAPHandler">
<init-params>
<init-param name="logDirectory" value="C:/temp" />
<init-param name="severityLevel" value="verbose" />
</init-params>
</handler>
</handler-chain>
</handler-chains>
and then I include the following in the operation tag:
<operation method="batchResponseToPSS([B)" component="ejbcomp0"
name="batchResponseToPSS"> >> handler-chain="myChain">> >>> >> and the also following> >>> >> <operation method="onlineResponseToPSS([B)" component="ejbcomp0"> >name="onlineResponseToPSS"> >> handler-chain="myChain">> >>> >> Without the handler-chains element my app works fine.> >>> >> My whole web-sercvices.xml is located at following location:> >>> >>>>http://newsgroups.bea.com/cgi-bin/dnewsweb?cmd=article&group=weblogic.developer.interest.webservices&item=3921&utag=> >>> >>> >> Any insight will be appreciated.> >>> >> Thanks> >> ---Radhe> >> >> -
How to generate param-prefix in web-services.xml
Hello I am using source2wsdd to generate my WSDL and my web-services.xml. For sake
of interoperability I would like to have the type param-prefix in the web-services.xml
file. From my Bean class what kind of javadoc comments would help me generate
the type param-prefix ?
I also would like the location="header" in the param list.
Thanks,
Aswin.
<param xmlns:param-prefix="http://tempuri.org/"
type="param-prefix:SOAPCredentials"
location="header"
class-name="com.xyz.webservices.SOAPCredentials"
name="SOAPCredentials"
style="in">
</param>
<return-param xmlns:param-prefix="http://tempuri.org/"
type="param-prefix:GetFileProfileInformationResponse"
class-name="com.xyz.webservices.GetFileProfileInformationResponse"
name="parameters">
</return-param>
</params>Please try this:
* @wlws:part p_SOAPAuthToken location="header"
* type="typeNS:p_SOAPAuthToken"
* class-name="com.xyz.webservices.SOAPAuthToken"
* style="inout"
* xmlns:typeNS=http://namespace/of/the/type
* @wlws:part p_SOAPCredentials location="header"
* type="typeNS:p_SOAPCredentials"
* class-name="com.xyz.webservices.SOAPCredentials"
* style="in"
* xmlns:typeNS=http://namespace/of/the/type
* @ejbgen:remote-method
public void login(SOAPAuthToken p_SOAPAuthToken,
SOAPCredentials p_SOAPCredentials)
I did not try this one out. So i can only hope that it works.
Regards,
-manoj
http://manojc.com
"Aswin Dinakar" <[email protected]> wrote in message
news:40aeeb5d$1@mktnews1...
>
I tried this
* @wlws:part p_SOAPAuthToken location="header"
* @wlws:part p_SOAPAuthToken type="param-prefix:p_SOAPAuthToken"
* @wlws:part p_SOAPAuthTokenclass-name="com.xyz.webservices.SOAPAuthToken"
* @wlws:part p_SOAPAuthToken style="inout"
* @wlws:part p_SOAPCredentials location="header"
* @wlws:part p_SOAPCredentials type="param-prefix:p_SOAPCredentials"
* @wlws:part p_SOAPCredentialsclass-name="com.xyz.webservices.SOAPCredentials"
* @wlws:part p_SOAPCredentials style="in"
* @ejbgen:remote-method
public void login(SOAPAuthToken p_SOAPAuthToken,
SOAPCredentials p_SOAPCredentials)
and I got the following error -
[source2wsdd] source2wsdd: In doclet classweblogic.webservice.tools.ddgen.Servi
ceGen, method start has thrown an exceptionjava.lang.reflect.InvocationTargetE
xception
[source2wsdd] weblogic.xml.stream.XMLStreamException: Attribute QNamevalue "par
am-prefix:p_SOAPAuthToken" does not map to a prefix that is in scope
[source2wsdd] atweblogic.webservice.dd.NSAttribute.getValueAsXMLName(NSAttrib
ute.java:45)
[source2wsdd] atweblogic.webservice.dd.DDLoader.processParamElement(DDLoader.
java:1252)
"manoj cheenath" <[email protected]> wrote:
Check out this example:
http://manojc.com/?sample3
You can find more details regarding the tags here:
http://manojc.com/tutorial/sample3/source2wsdd.html
Regards,
-manoj
http://manojc.com
"Aswin D" <[email protected]> wrote in message
news:[email protected]...
Hello I am using source2wsdd to generate my WSDL and my
web-services.xml.
For sake
of interoperability I would like to have the type param-prefix inthe
web-services.xml
file. From my Bean class what kind of javadoc comments would help megenerate
the type param-prefix ?
I also would like the location="header" in the param list.
Thanks,
Aswin.
<param xmlns:param-prefix="http://tempuri.org/"
type="param-prefix:SOAPCredentials"
location="header"
class-name="com.xyz.webservices.SOAPCredentials"
name="SOAPCredentials"
style="in">
</param>
<return-param xmlns:param-prefix="http://tempuri.org/"
type="param-prefix:GetFileProfileInformationResponse"
class-name="com.xyz.webservices.GetFileProfileInformationResponse"
name="parameters">
</return-param>
</params> -
Generate web-service.xml
I need to configure the deployment descriptor web-services.xml, but I don't know where or how to generate it. I use version 8.1 of weblogic. Someone can help me? thanks!
I have an XML input in my transaction. I was able to generate the WSDL without problems. But need to know how to test it by sendig in some XML data. Probably, we could both be helping each other in the process.
Regards,
Chanti.
Maybe you are looking for
-
PS CS4 CSXSLibrary: "CSXSInterface.instance" always null
I was referred to this sub section of the adobe forums for this question: I want: Start creating my own Photoshop CS4 SWF panel coded with the FlexSDK in FlashDevelop (pure AS3, no flex). I have: FlexSDK & FlashDevelop CSXSLibrary-2.0-sdk-3.4.swc Pho
-
Songs stop half way???
Ive purchased a couple of albums and have downloaded them all. However, when I play some of them they only play for between 20 to 60 seconds and then skip to the next songs. I have no authorised devices on my apple id so thats no the issue. Please he
-
A tribute to a nice player called xtra zen (sdcard 32gb )
https://www.youtube.com/watch?v=nTSMSAiLasg enjoy . i have been banned for posting this video here , so ..................
-
Email for a user goes also other user's inbox (sometimes)
Hello, I have a problem with a client with sbs2011 (sda migrated sbs2003), it happened that internal email sent to a user, also appeared in imbox another user!! I have checked and there are no active rules and the tracking seems to be delivered only
-
i have just bought the windows kin one phone but it doesnt accept my user name right from start when it asks me for the user name that i give it. what should i do. am a Ugandan 24yrs. really need help. thank you.