HTTP Authentication?

2006-03-22 Thread DFrahm

What's the simplest programmatic way
to do HTTP Authentication with Axis 1.x?

Basically, I need to convert this Apache
SOAP code:

Call call = new Call();
SOAPHTTPConnection hc = new SOAPHTTPConnection();
hc.setUserName(userName);
hc.setPassword(password);
call.setSOAPTransport(hc);

BTW, I know that most people will say
that I *should* be using WS-Security, and in most of my apps I am.  But
I have one where I need this.

- David

Re: WSDL schema

2006-03-07 Thread DFrahm

So, the big question for a lot of people
is... what *IS* sufficient???







"Anne Thomas Manes"
<[EMAIL PROTECTED]> 
03/07/2006 08:17 AM



Please respond to
axis-user@ws.apache.org





To
axis-user@ws.apache.org


cc



Subject
Re: WSDL schema








There are certain aspects of valid WSDL that cannot be
specified in XML Schema, therefore using schema validation is not sufficient
to ensure WSDL validity.

Anne

On 3/6/06, rguoih lee <[EMAIL PROTECTED]>
wrote:
to validate a WSDL is a valid one 
 
do i just need 
 
1) WSDL schema -  
http://schemas.xmlsoap.org/wsdl/
2) WSDL document
 
input these 2 document into a XML editor just like validate
XML doc with DTD?
 
since i never use a XML schema but only DTDs 
 
should i cut and paste XML schema into same file as WSDL
? just like put DTD into same file as an XML file ? 
 
any tutorial on the web?
 
Thanks  

Yahoo! Mail
Bring photos to life! New
PhotoMail makes sharing a breeze. 



Re: Change endoint programmatically

2006-02-20 Thread DFrahm

Here's what I've got that's working.
 Not sure if this is good/bad or whatever... Any thoughts?

         
              PoliceOfficerRegistryServiceLocator
locator = new PoliceOfficerRegistryServiceLocator();
         
              Remote
remote = locator.getPort(PoliceOfficerRegistryServiceSoap.class);
         
              Stub axisPort
= (Stub) remote;
         
              PoliceOfficerRegistryServiceSoapStub
serviceStub = (PoliceOfficerRegistryServiceSoapStub)axisPort;
         
              portName
= serviceStub.getPortName();
         
              operationName
= PoliceOfficerRegistryServiceSoapStub._operations[0].getName();
         
              logger.info("Instantiate
call to port " + portName.getLocalPart() + ", operationName "
+ operationName + "...");
         
              call =
(Call) locator.createCall(portName, operationName);
         
              if (serviceRequestor.getEndpoint()
!= null) {
         
               
      logger.info("Using endpoing from serviceRequestor...");
         
               
      call.setTargetEndpointAddress(new URL(serviceRequestor.getEndpoint()));
         
              } else
{
         
               
      logger.info("Using endpoing from generated
stubs...");
         
               
      call.setTargetEndpointAddress(new URL(locator.getPoliceOfficerRegistryServiceSoapAddress()));
         
              }
         
              logger.info("call.getTargetEndpointAddress()
= " + call.getTargetEndpointAddress());        
               
         
      
         
              CPSINDocument
request = new CPSINDocument();
         
              String
xmlInput = soapBodyElement.getAsString();
         
              request.setCPSIN200Document(xmlInput);
         
              response
= (MajorCaseResponse) call.invoke(new Object[] {request});

- David







David Frahm/Teamhuber

02/17/2006 11:28 AM




To
Apache Axis User


cc



Subject
Change endoint programmatically







What's the best way for me to change
my endpoint dynamically?

I've got a working Axis client that
uses the WSDL2Java generated stubs.  I can't figure out a real clean
way to utilize the stubs and just change the endpoint.  How are people
doing this?

If it helps, here's what I've got so
far...

I created a ServiceRequestor class that
handles getting my document for the SOAP body, and that class also has
a property for the endpoint.  I'd like to change that endpoint for
development vs. test vs. production environments.

The problem is my call in the first
line of overrideEndpoint() is always null.  Otherwise this would work
great!

        [...snip...]
         
              CriminalInvestigationsService
service = new CriminalInvestigationsServiceLocator();
         
              CriminalInvestigationsServiceSoap
serviceSoap;
         
              MajorCaseResponse
response;
         
              serviceSoap
= service.getCriminalInvestigationsServiceSoap();

         
              if (serviceRequestor.getEndpoint()
!= null) {
         
               
      Stub stub = (Stub) serviceSoap;
         
               
      overrideEndpoint(stub);
         
              }

         
              CPSINDocument
request = new CPSINDocument();
         
              String
xmlInput = soapBodyElement.getAsString();
         
              request.setCPSIN200Document(xmlInput);
         
              logger.info("Invoke
the web service, passing request object...");
         
              response
= serviceSoap.submitMajorCaseInvestigation(request);

        [...snip...]

        protected
void overrideEndpoint(Stub stub) {
         
      Call call = stub._getCall();
         
      if (call == null) {
         
              logger.error("Call
is null.");
         
      } else {
         
              if (serviceRequestor.getEndpoint()
!= null) {
         
               
      logger.info("Overriding call endpoint...");
         
               
      call.setTargetEndpointAddress(serviceRequestor.getEndpoint());
         
               
      logger.info("Endpoint overridden as "
+ call.getTargetEndpointAddress());
         
              } else
{
         
               
      logger.info("ServiceRequestor endpoint
not set, using default.");
         
              }
         
      }
        }





Change endoint programmatically

2006-02-17 Thread DFrahm

What's the best way for me to change
my endpoint dynamically?

I've got a working Axis client that
uses the WSDL2Java generated stubs.  I can't figure out a real clean
way to utilize the stubs and just change the endpoint.  How are people
doing this?

If it helps, here's what I've got so
far...

I created a ServiceRequestor class that
handles getting my document for the SOAP body, and that class also has
a property for the endpoint.  I'd like to change that endpoint for
development vs. test vs. production environments.

The problem is my call in the first
line of overrideEndpoint() is always null.  Otherwise this would work
great!

        [...snip...]
         
              CriminalInvestigationsService
service = new CriminalInvestigationsServiceLocator();
         
              CriminalInvestigationsServiceSoap
serviceSoap;
         
              MajorCaseResponse
response;
         
              serviceSoap
= service.getCriminalInvestigationsServiceSoap();

         
              if (serviceRequestor.getEndpoint()
!= null) {
         
               
      Stub stub = (Stub) serviceSoap;
         
               
      overrideEndpoint(stub);
         
              }

         
              CPSINDocument
request = new CPSINDocument();
         
              String
xmlInput = soapBodyElement.getAsString();
         
              request.setCPSIN200Document(xmlInput);
         
              logger.info("Invoke
the web service, passing request object...");
         
              response
= serviceSoap.submitMajorCaseInvestigation(request);

        [...snip...]

        protected
void overrideEndpoint(Stub stub) {
         
      Call call = stub._getCall();
         
      if (call == null) {
         
              logger.error("Call
is null.");
         
      } else {
         
              if (serviceRequestor.getEndpoint()
!= null) {
         
               
      logger.info("Overriding call endpoint...");
         
               
      call.setTargetEndpointAddress(serviceRequestor.getEndpoint());
         
               
      logger.info("Endpoint overridden as "
+ call.getTargetEndpointAddress());
         
              } else
{
         
               
      logger.info("ServiceRequestor endpoint
not set, using default.");
         
              }
         
      }
        }