[jboss-user] [JBossWS] - Re: How could see the endpoint the SOAP headers built by a o
camateusno
do-not-reply at jboss.com
Thu Nov 29 11:53:06 EST 2007
Thanks alessio,
but perhaps that step, simple and intuitive,
I still do not understand.
I show you my strategy, and maybe you can give me another hand:
perhaps quite usual:
I have
- a SEI class: QMWISeSoap
- a class that extend of class javax.xml.ws.Service, and provide the getter (public QMWISeSoap getQMWISeSoap()) for QMWISeSoap: QMWISe
- a class that provide a instance of QMWISeSoap named endPoint, in its constructor call QMWISe.getQMWISeSoap() and assign it to endPoint : QMWISeWebService
- a package that contain classes that extend of QMWISeWebService, each class of this package has a methods that call a corresponding method in the SEI class, using the attribute endPoint inherited from QMWISeWebService.
I begin using this classes, really wrappers of SEI, and operate perfectly.
A new requirement consist in aggregate security data in SOAP headers.
After that consume the webservice, i see other class that i dont know how fits in what was already running. This class is named ObjectFactory.
This class i suppose after of study it, is a factory of objects that represent the requests. Also provide two attributes (securityHeader and trustHeader) and its getters methods and setters methods. These attributes are precisely the data that would need for SOAP headers.
in this way:
private final static QName _Trust_QNAME = new QName("http://questionmark.com/QMWISe/", "Trust");
private final static QName _Security_QNAME = new QName("http://questionmark.com/QMWISe/", "Security");
methods:
/**
* Create an instance of {@link JAXBElement }{@code <}{@link SecurityHeader }{@code >}}
*
*/
@XmlElementDecl(namespace = "http://questionmark.com/QMWISe/", name = "Security")
public JAXBElement createSecurity(SecurityHeader value) {
return new JAXBElement(_Security_QNAME, SecurityHeader.class, null, value);
}
My confusion is that i dont understand how relate this facility of ObjectFactory with the work that had operated.
First i do this:
By example
ParticipantData.createParticipant(Participant participant)
where ParticipantData is a wrapper of part of SEI.
then, i created a object participant without using the objectfactory facility, since the Participant class has its constructor and work.
thinking in integrate the ObjectFactory, then now i created the instance of Participant using the ObjectFactory, in this way:
participant = factory.createParticipant(), and i setting the securityheader with ObjectFactory. And i call the method of ParticipantData named createParticipant passing it the object Participant builded with the ObjectFactory.
Lastly i discovered that in the objectfactory there are similar methods to the methods of my wrapper classes. Then i prove calling this methods and not the methods of wrappers.
Any clarification is greatly appreciated, thank you.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4108980#4108980
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4108980
More information about the jboss-user
mailing list