Tema: Ka cia darau blogai?
Autorius: orcl
Data: 2009-01-16 17:43:00
Yra ws: http://www.ecubicle.net/iptocountry.asmx?wsdl

kvieciant, meta klaida:
Exception in thread "main" javax.xml.rpc.soap.SOAPFaultException: 
System.Web.Services.Protocols.SoapException: Server was unable to process 
request. ---> System.ArgumentNullException: Value cannot be null.
Parameter name: input
   at System.Text.RegularExpressions.Regex.Match(String input)
   at System.Text.RegularExpressions.Regex.Match(String input, String 
pattern)
   at iptocountry.CheckInput(String IPv4)
   at iptocountry.FindCountryAsString(String V4IPAddress)
   --- End of inner exception stack trace ---
        at 
oracle.j2ee.ws.client.StreamingSender._raiseFault(StreamingSender.java:540)
        at 
oracle.j2ee.ws.client.StreamingSender._sendImpl(StreamingSender.java:390)
        at 
oracle.j2ee.ws.client.StreamingSender._send(StreamingSender.java:110)
        at 
oracle.j2ee.ws.client.dii.CallInvokerImpl.doInvoke(CallInvokerImpl.java:90)
        at oracle.j2ee.ws.client.dii.BasicCall.invoke(BasicCall.java:678)


KAIP CIA NUSIMUSA TAS PARAMETRAS (nes cia jau web service'o exception'as )? 
GAL NE TAIP SETTINU?

bandau iskviesti, rasydamas toki kod:
<-------PRADZIA ------->
    import java.net.URL;

    import javax.xml.rpc.ServiceFactory;
    import javax.xml.rpc.Service;
    import javax.xml.rpc.Call;

    import javax.xml.namespace.QName;
import javax.xml.rpc.ParameterMode;

    public class Ws {

      public static void main(String[] args) throws Exception {

        // Setup the global JAXM message factory
        //System.setProperty("javax.xml.soap.MessageFactory",
        //  "weblogic.webservice.core.soap.MessageFactoryImpl");
        // Setup the global JAX-RPC service factory
        //System.setProperty( "javax.xml.rpc.ServiceFactory",
        //  "weblogic.webservice.core.rpc.ServiceFactoryImpl");

        // create service factory
        ServiceFactory factory = ServiceFactory.newInstance();

        // define qnames
        String targetNamespace = "http://www.ecubicle.net/webservices/";
        String soapActionURI = 
"http://www.ecubicle.net/webservices/FindCountryAsString";
        Object[] params = new Object[1];
        QName serviceName = new QName(targetNamespace, "iptocountry");
        QName portName = new QName(targetNamespace, "iptocountrySoap");
        QName operationName = new QName(targetNamespace, 
"FindCountryAsString");
        QName stringTypeQname = new 
QName("http://www.w3.org/2001/XMLSchema", "string");

        URL wsdlLocation = new 
URL("http://www.ecubicle.net/iptocountry.asmx?wsdl");
        // create service
        Service service = factory.createService(wsdlLocation, serviceName);

        // create call
        Call call = service.createCall(portName, operationName);
        // setting properties
        call.setProperty(call.SOAPACTION_USE_PROPERTY, "true");
        call.setProperty(call.SOAPACTION_URI_PROPERTY, soapActionURI);
        // Set parameters
        call.addParameter("V4IPAddress", stringTypeQname, 
ParameterMode.IN);
        call.setReturnType(stringTypeQname);
        params[0] = "86.100.233.5";

        // invoke the remote web service
        Float result = (Float) call.invoke(params);

        System.out.println("\n");
        System.out.println("This example shows how to create a dynamic 
client application that invokes a non-WebLogic Web service.");
        System.out.println("The webservice used was 
http://services.xmethods.net/soap/urn:xmethods-delayed-quotes.wsdl");
        System.out.println("The quote for BEAS is: ");
        System.out.println(result);
      }

    }
<-------PABAIGA -------> 


3Dastronomyagricultureaudioautosautos.audiautos.audioautos.binariesautos.bmwautos.clubautos.fordautos.hondacrxautos.japanautos.mercedesautos.opelautos.sportautos.volvoautos.vwaviaavia.binariesbankcardsbinariesbooksbuildingcinemacommercecomp.hardwarecomp.softwarecomp.lietuvinimascomp.networksculturedarbas.ieskaudarbas.siulaudesigneconomicselectronicsfaunafauna.aquafauna.binariesfishingflorafotofoto.binariesgamesgames.csgames.onlinegsmgurmanaihumourhumour.binariesinternetlawmicrosoftmotomusicmusic.binariesmusic.instrumentsmusic.LT.binariesnavigacijaphppoliticsprogrammingrpgsportstudyingsveikatatalktesttranslationtransportationtraveltravel.binariestvunixvideovideo.binarieswatersportswwwwww.flashpdaautos.supermama.ltmobiledarbasretro.3Dretro.agricultureretro.astronomyretro.audioretro.autosretro.autos.audiretro.autos.audioretro.autos.binariesretro.autos.bmwretro.autos.clubretro.autos.fordretro.autos.hondacrxretro.autos.japanretro.autos.mercedesretro.autos.opelretro.autos.sportretro.autos.supermamaretro.autos.supermama.ltretro.autos.volvoretro.autos.vwretro.aviaretro.avia.binariesretro.bankcardsretro.beosretro.binariesretro.booksretro.buildingretro.cinemaretro.commerceretro.compretro.comp.hardwareretro.comp.lietuvinimasretro.comp.networksretro.comp.softwareretro.cultureretro.darbasretro.darbas.ieskauretro.darbas.siulauretro.designretro.economicsretro.electronicsretro.e-vejasretro.faunaretro.fauna.aquaretro.fauna.binariesretro.fishingretro.floraretro.fotoretro.foto.binariesretro.gamesretro.games.csretro.games.onlineretro.games.rpgretro.genealogijaretro.gsmretro.gurmanairetro.humourretro.humour.binariesretro.internetretro.YZFretro.YZF.nebukretro.YZF.nebuk.netikintisretro.YZF.nebuk.netikintis.bukretro.YZF.nebuk.netikintis.buk.tikintisretro.lawretro.microsoftretro.mobileretro.motoretro.musicretro.music.binariesretro.music.instrumentsretro.music.LTretro.music.LT.binariesretro.navigacijaretro.newsretro.news.taisyklesretro.newuserretro.pdaretro.phpretro.politicsretro.programmingretro.rpgretro.sportretro.studyingretro.sveikataretro.talkretro.translationretro.transportationretro.travelretro.travel.binariesretro.tvretro.unixretro.videoretro.video.binariesretro.watersportsretro.wwwretro.www.flashdiylt.rkm.news.announcelt.rkm.news.newuser