Search Results

Search found 639 results on 26 pages for 'literal'.

Page 8/26 | < Previous Page | 4 5 6 7 8 9 10 11 12 13 14 15  | Next Page >

  • "Exception: msg 'axis2:null', not-found" when using a suds client with an axis2 server

    - by konrad
    I am writing a Suds (Python) SOAP client for an Axis2 server I have no control over. Suds chokes on the WSDL file with the following exception: File "site-packages/suds/wsdl.py", line 494, in resolve raise Exception("msg '%s', not-found" % op.input) Exception: msg 'axis2:null', not-found This is the WSDL file (I have replaced the hostnames with localhost). Any clue on how to fix this with the ImportDoctor? <?xml version="1.0" encoding="UTF-8"?> <wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:axis2="http://ws.apache.org/axis2" xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" targetNamespace="http://ws.apache.org/axis2"> <wsdl:types/> <wsdl:portType name="__SynapseServicePortType"> <wsdl:operation name="mediate"> <wsdl:input message="axis2:null" wsaw:Action="urn:mediate"/> <wsdl:output message="axis2:null" wsaw:Action="urn:mediateResponse"/> </wsdl:operation> </wsdl:portType> <wsdl:binding name="__SynapseServiceSoap11Binding" type="axis2:__SynapseServicePortType"> <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/> <wsdl:operation name="mediate"> <soap:operation soapAction="urn:mediate" style="document"/> <wsdl:input> <soap:body use="literal"/> </wsdl:input> <wsdl:output> <soap:body use="literal"/> </wsdl:output> </wsdl:operation> </wsdl:binding> <wsdl:binding name="__SynapseServiceSoap12Binding" type="axis2:__SynapseServicePortType"> <soap12:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/> <wsdl:operation name="mediate"> <soap12:operation soapAction="urn:mediate" style="document"/> <wsdl:input> <soap12:body use="literal"/> </wsdl:input> <wsdl:output> <soap12:body use="literal"/> </wsdl:output> </wsdl:operation> </wsdl:binding> <wsdl:binding name="__SynapseServiceHttpBinding" type="axis2:__SynapseServicePortType"> <http:binding verb="POST"/> <wsdl:operation name="mediate"> <http:operation location="mediate"/> <wsdl:input> <mime:content type="text/xml" part="mediate"/> </wsdl:input> <wsdl:output> <mime:content type="text/xml" part="mediate"/> </wsdl:output> </wsdl:operation> </wsdl:binding> <wsdl:service name="__SynapseService"> <wsdl:port name="__SynapseServiceHttpsSoap11Endpoint" binding="axis2:__SynapseServiceSoap11Binding"> <soap:address location="https://localhost:8843/services/__SynapseService.__SynapseServiceHttpsSoap11Endpoint"/> </wsdl:port> <wsdl:port name="__SynapseServiceHttpSoap11Endpoint" binding="axis2:__SynapseServiceSoap11Binding"> <soap:address location="http://localhost:8880/services/__SynapseService.__SynapseServiceHttpSoap11Endpoint"/> </wsdl:port> <wsdl:port name="__SynapseServiceHttpsSoap12Endpoint" binding="axis2:__SynapseServiceSoap12Binding"> <soap12:address location="https://localhost:8843/services/__SynapseService.__SynapseServiceHttpsSoap12Endpoint"/> </wsdl:port> <wsdl:port name="__SynapseServiceHttpSoap12Endpoint" binding="axis2:__SynapseServiceSoap12Binding"> <soap12:address location="http://localhost:8880/services/__SynapseService.__SynapseServiceHttpSoap12Endpoint"/> </wsdl:port> <wsdl:port name="__SynapseServiceHttpsEndpoint" binding="axis2:__SynapseServiceHttpBinding"> <http:address location="https://localhost:8843/services/__SynapseService.__SynapseServiceHttpsEndpoint"/> </wsdl:port> <wsdl:port name="__SynapseServiceHttpEndpoint" binding="axis2:__SynapseServiceHttpBinding"> <http:address location="http://localhost:8880/services/__SynapseService.__SynapseServiceHttpEndpoint"/> </wsdl:port> </wsdl:service> </wsdl:definitions>

    Read the article

  • Webservice works with SoapSonar but not with Visual Studio Winform

    - by Rebol Tutorial
    I have generated a wsdl file with Visual Studio which is here; http://reboltutorial.com/webservices/discordian.wsdl Implementation is a cgi instead of a .net framework program but that should not matter as it is the purposes of webservices. I tested it successfully with SoapSonar: But under Visual Studio it fails with this code: private void button1_Click(object sender, EventArgs e) { RebolTutorial.ServiceSoapClient Discordian = new RebolTutorial.ServiceSoapClient("ServiceSoap"); int year = int.Parse(this.year.Text); int month = int.Parse(this.month.Text); int day = int.Parse(this.day.Text); response.Text = Discordian.Discordian(year,month,day); } Any reason you can see ? Thanks. Request below: <?xml version="1.0" encoding="utf-8"?> <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:s="http://www.w3.org/2001/XMLSchema" xmlns:tns="http://reboltutorial.com/"> <soap:Body> <tns:Discordian> <tns:year>2010</tns:year> <tns:month>5</tns:month> <tns:day>1</tns:day> </tns:Discordian> </soap:Body> </soap:Envelope> as well as WSDL if needed: <?xml version="1.0" encoding="utf-8"?> <wsdl:definitions xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tm="http://microsoft.com/wsdl/mime/textMatching/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:tns="http://reboltutorial.com/" xmlns:s="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" targetNamespace="http://reboltutorial.com/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"> <wsdl:types> <s:schema elementFormDefault="qualified" targetNamespace="http://reboltutorial.com/"> <s:element name="Discordian"> <s:complexType> <s:sequence> <s:element minOccurs="1" maxOccurs="1" name="year" type="s:int" /> <s:element minOccurs="1" maxOccurs="1" name="month" type="s:int" /> <s:element minOccurs="1" maxOccurs="1" name="day" type="s:int" /> </s:sequence> </s:complexType> </s:element> <s:element name="DiscordianResponse"> <s:complexType> <s:sequence> <s:element minOccurs="0" maxOccurs="1" name="DiscordianResult" type="s:string" /> </s:sequence> </s:complexType> </s:element> </s:schema> </wsdl:types> <wsdl:message name="DiscordianSoapIn"> <wsdl:part name="parameters" element="tns:Discordian" /> </wsdl:message> <wsdl:message name="DiscordianSoapOut"> <wsdl:part name="parameters" element="tns:DiscordianResponse" /> </wsdl:message> <wsdl:portType name="ServiceSoap"> <wsdl:operation name="Discordian"> <wsdl:input message="tns:DiscordianSoapIn" /> <wsdl:output message="tns:DiscordianSoapOut" /> </wsdl:operation> </wsdl:portType> <wsdl:binding name="ServiceSoap" type="tns:ServiceSoap"> <soap:binding transport="http://schemas.xmlsoap.org/soap/http" /> <wsdl:operation name="Discordian"> <soap:operation soapAction="http://reboltutorial.com/Discordian" style="document" /> <wsdl:input> <soap:body use="literal" /> </wsdl:input> <wsdl:output> <soap:body use="literal" /> </wsdl:output> </wsdl:operation> </wsdl:binding> <wsdl:binding name="ServiceSoap12" type="tns:ServiceSoap"> <soap12:binding transport="http://schemas.xmlsoap.org/soap/http" /> <wsdl:operation name="Discordian"> <soap12:operation soapAction="http://reboltutorial.com/Discordian" style="document" /> <wsdl:input> <soap12:body use="literal" /> </wsdl:input> <wsdl:output> <soap12:body use="literal" /> </wsdl:output> </wsdl:operation> </wsdl:binding> <wsdl:service name="Service"> <wsdl:port name="ServiceSoap" binding="tns:ServiceSoap"> <soap:address location="http://reboltutorial.com/cgi-bin/discordian.cgi" /> </wsdl:port> <wsdl:port name="ServiceSoap12" binding="tns:ServiceSoap12"> <soap12:address location="http://reboltutorial.com/cgi-bin/discordian.cgi" /> </wsdl:port> </wsdl:service> </wsdl:definitions>

    Read the article

  • Can't get JAX-WS binding customization to work

    - by Florian
    Hi! I'm trying to resolve a name clash in a wsdl2java mapping with CXF 2.2.6 The relevant wsdl snippets are: <types>... <xs:schema... <xs:element name="GetBPK"> <xs:complexType> <xs:sequence> <xs:element name="PersonInfo" type="szr:PersonInfoType" /> <xs:element name="BereichsKennung" type="xs:string" /> <xs:element name="VKZ" type="xs:string" /> <xs:element name="Target" type="szr:FremdBPKRequestType" minOccurs="0" maxOccurs="unbounded" /> <xs:element name="ListMultiplePersons" type="xs:boolean" minOccurs="0" /> </xs:sequence> </xs:complexType> </xs:element> <xs:element name="GetBPKResponse"> <xs:complexType> <xs:sequence> <xs:element name="GetBPKReturn" type="xs:string" minOccurs="0" /> <xs:element name="FremdBPK" type="szr:FremdBPKType" minOccurs="0" maxOccurs="unbounded" /> <xs:element name="PersonInfo" type="szr:PersonInfoType" minOccurs="0" maxOccurs="5" /> </xs:sequence> </xs:complexType> </xs:element> </xs:schema> </types> <message name="GetBPKRequest"> <part name="parameters" element="szr:GetBPK" /> </message> <message name="GetBPKResponse"> <part name="parameters" element="szr:GetBPKResponse" /> </message> <binding... <operation name="GetBPK"> <wsdlsoap:operation soapAction="" /> <input name="GetBPKRequest"> <wsdlsoap:header message="szr:Header" part="SecurityHeader" use="literal" /> <wsdlsoap:body use="literal" /> </input> <output name="GetBPKResponse"> <wsdlsoap:body use="literal" /> </output> <fault name="SZRException"> <wsdlsoap:fault use="literal" name="SZRException" /> </fault> </operation> As you can see, the GetBPK operation takes a GetBPK as input and returns a GetBPKResponse as an output. Each element of both the GetBPK, as well as the GetBPKResponse type would be mapped to a method parameter in Java. Unfortunately both GetBPK, as well as the GetBPKResponse have an element with the name "PersonInfo", which results in a name clash. I'm trying to resolve that using a binding customization: <jaxws:bindings wsdlLocation="SZ2-aktuell.wsdl" xmlns:jaxws="http://java.sun.com/xml/ns/jaxws" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:jxb="http://java.sun.com/xml/ns/jaxb" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:szr="urn:SZRServices"> <jaxws:bindings node="wsdl:definitions/wsdl:portType[@name='SZR']/wsdl:operation[@name='GetBPK']"> <!-- See page 116 of the JAX-WS specification version 2.2 from 10, Dec 2009 --> <jaxws:parameter part="wsdl:definitions/wsdl:message[@name='GetBPKResponse']/wsdl:part[@name='parameters']" childElementName="szr:PersonInfoType" name="PersonInfoParam" /> </jaxws:bindings> </jaxws:bindings> and call wsdl2java with the -b parameter. Unforunately, I still get the message: WSDLToJava Error: Parameter: personInfo already exists for method getBPK but of type at.enno.egovds.szr.PersonInfoType instead of java.util.List<at.enno.egovds.szr.PersonInfoType>. Use a JAXWS/JAXB binding customization to rename the parameter. I have tried several variants of the binding customization, and searched Google for hours, but unfortunately I cannot find a solution to my problem. I suspenct that the childElementName attribute is wrong, but I can't find an example of what would have to be set to make it work. Thanks in advance!

    Read the article

  • Lost parameter calling WS from PHP

    - by Zyd
    Hi, I'm trying to call this WS from PHP: namespace WsInteropTest { /// <summary> /// Summary description for Service1 /// </summary> [WebService(Namespace = "http://advantage-security.com/")] [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)] [System.ComponentModel.ToolboxItem(false)] // To allow this Web Service to be called from script, using ASP.NET AJAX, uncomment the following line. // [System.Web.Script.Services.ScriptService] public class TestWs : System.Web.Services.WebService { [WebMethod] public string HelloWorld(int entero) { return "Hello World " + entero.ToString(); } } } The code i use to call the WS is this: <?php require_once('nusoap\nusoap.php'); $client = new nusoap_client('http://localhost/testws/TestWS.asmx?WSDL'); $params = array( 'entero' => 100 ); $result = $client->call('HelloWorld', array($params), 'http://advantage-security.com/HelloWorld', 'http://advantage-security.com/HelloWorld'); print_r($result); ?> and the result is this Hello World 0 What do you think may be the problem? According to what i've read there is no issues with simple types between .NET (which are converted to standard soap types) and PHP. If it is of use, here it is the WSDL. Thanks in advance <?xml version="1.0" encoding="utf-8" ?> - <wsdl:definitions xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tm="http://microsoft.com/wsdl/mime/textMatching/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:tns="http://advantage-security.com/" xmlns:s="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" targetNamespace="http://advantage-security.com/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"> - <wsdl:types> - <s:schema elementFormDefault="qualified" targetNamespace="http://advantage-security.com/"> - <s:element name="HelloWorld"> - <s:complexType> - <s:sequence> <s:element minOccurs="1" maxOccurs="1" name="entero" type="s:int" /> </s:sequence> </s:complexType> </s:element> - <s:element name="HelloWorldResponse"> - <s:complexType> - <s:sequence> <s:element minOccurs="0" maxOccurs="1" name="HelloWorldResult" type="s:string" /> </s:sequence> </s:complexType> </s:element> </s:schema> </wsdl:types> - <wsdl:message name="HelloWorldSoapIn"> <wsdl:part name="parameters" element="tns:HelloWorld" /> </wsdl:message> - <wsdl:message name="HelloWorldSoapOut"> <wsdl:part name="parameters" element="tns:HelloWorldResponse" /> </wsdl:message> - <wsdl:portType name="TestWsSoap"> - <wsdl:operation name="HelloWorld"> <wsdl:input message="tns:HelloWorldSoapIn" /> <wsdl:output message="tns:HelloWorldSoapOut" /> </wsdl:operation> </wsdl:portType> - <wsdl:binding name="TestWsSoap" type="tns:TestWsSoap"> <soap:binding transport="http://schemas.xmlsoap.org/soap/http" /> - <wsdl:operation name="HelloWorld"> <soap:operation soapAction="http://advantage-security.com/HelloWorld" style="document" /> - <wsdl:input> <soap:body use="literal" /> </wsdl:input> - <wsdl:output> <soap:body use="literal" /> </wsdl:output> </wsdl:operation> </wsdl:binding> - <wsdl:binding name="TestWsSoap12" type="tns:TestWsSoap"> <soap12:binding transport="http://schemas.xmlsoap.org/soap/http" /> - <wsdl:operation name="HelloWorld"> <soap12:operation soapAction="http://advantage-security.com/HelloWorld" style="document" /> - <wsdl:input> <soap12:body use="literal" /> </wsdl:input> - <wsdl:output> <soap12:body use="literal" /> </wsdl:output> </wsdl:operation> </wsdl:binding> - <wsdl:service name="TestWs"> - <wsdl:port name="TestWsSoap" binding="tns:TestWsSoap"> <soap:address location="http://localhost/testws/TestWS.asmx" /> </wsdl:port> - <wsdl:port name="TestWsSoap12" binding="tns:TestWsSoap12"> <soap12:address location="http://localhost/testws/TestWS.asmx" /> </wsdl:port> </wsdl:service> </wsdl:definitions>

    Read the article

  • WCF Webservices and FaultContract - Client's receiving SoapExc insted of FaultException<TDetails>

    - by Alessandro Di Lello
    Hi All, i'm developing a WCF Webservice and consuming it within a mvc2 application. My problem is that i'm using FaultContracts on my methods with a custom FaultDetail and i'm throwing manyally the faultexception but when the client receive the exception , it receives a normal SoapException instead of my FaultException that i throwed from the service side. Here is some code: Custom Fault Detail Class: [DataContract] public class MyFaultDetails { [DataMember] public string Message { get; set; } } Operation on service contract: [OperationContract] [FaultContract(typeof(MyFaultDetails))] void ThrowException(); Implementation: public void ThrowException() { var details = new MyFaultDetails { Message = "Exception Test" }; throw new FaultException<MyFaultDetails >(details , new FaultReason(details .Message), new FaultCode("MyFault")); } Client side: try { // Obv proxy init etc.. service.ThrowException(); } catch (FaultException<MyFaultDetails> ex) { // stuff } catch (Exception ex) { // stuff } What i expect is to catch the FaultException , instead that catch is skipped and the next catch is taken with an exception of type SoapException. Am i missing something ? i red a lot of threads about using faultcontracts within wcf and what i did seems to be good. I had a look at the wsdl and xsd generated and they look fine. here's a snippet regarding this method: <wsdl:operation name="ThrowException"> <wsdl:input wsaw:Action="http://tempuri.org/IAnyJobService/ThrowException" message="tns:IAnyJobService_ThrowException_InputMessage" /> <wsdl:output wsaw:Action="http://tempuri.org/IAnyJobService/ThrowExceptionResponse" message="tns:IAnyJobService_ThrowException_OutputMessage" /> <wsdl:fault wsaw:Action="http://tempuri.org/IAnyJobService/ThrowExceptionAnyJobServiceFaultExceptionFault" name="AnyJobServiceFaultExceptionFault" message="tns:IAnyJobService_ThrowException_AnyJobServiceFaultExceptionFault_FaultMessage" /> </wsdl:operation> <wsdl:operation name="ThrowException"> <soap:operation soapAction="http://tempuri.org/IAnyJobService/ThrowException" style="document" /> <wsdl:input> <soap:body use="literal" /> </wsdl:input> <wsdl:output> <soap:body use="literal" /> </wsdl:output> <wsdl:fault name="AnyJobServiceFaultExceptionFault"> <soap:fault use="literal" name="AnyJobServiceFaultExceptionFault" namespace="" /> </wsdl:fault> </wsdl:operation> Any help ? Thanks in advance Regards Alessandro

    Read the article

  • OpenPGP Signing

    - by singpolyma
    I'm reading RFC4880 in an attempt to produce an implementatdion of a subset of OpenPGP (RSA signatures) using http://phpseclib.sourceforge.net/. I have the publickey and compression-literal-signature packets parsed out. I can extract n and e and feed them to Crypt_RSA to construct a verifier. I tell it I'm using sha256. It then needs a "message" and a " signature" parametre. I get the signature data out of the signature packet no problem. The question I have is: what is "message"? According to sec tion 5.2.4 it's some combination of the literal data packet(s?) (their bodies or the whole packet?) and the "hashed" subpackets. Do I just concat all the data packets and the hashed packets together in the order they appear?

    Read the article

  • What are Windows code pages?

    - by Mike D
    I'm trying to gain a basic understanding of what is meant by a Windows code page. I kind of get the feeling it's a translation between a given 8 bit value and some 'abstraction' for a given character graphic. I made the following experiment. I created a "" character literal with two versions of the letter u with an umlaut. One created using the ALT 129 (uses code page 437) value and one using the ALT 0252 (uses code page 1252) value. When I examined the literal both characters had the value 252. Is 252 the universal 8 bit abstraction for u with an umlaut? Is it the Unicode value? Aside from keyboard input are there any library routines or system calls that use code pages? For example is there a function to translate a string using a given code table (as above for the ALT 129 value)?

    Read the article

  • How to use json object notation to retrieve dbpedia json data

    - by Margi
    In my php code, I am retrieving json data as below. <?php $url = "http://dbpedia.org/data/Los_Angeles.json"; $data = file_get_contents($url); echo $data; ?> The javascript code consumes this json data returned from php and gets the json object as below. var doc = eval('(' + request.responseText + ')'); How to retrieve the following json data using dot notations. The keys contain URLs. "http://dbpedia.org/ontology/populationTotal" : [ { "type" : "literal", "value" : 3792621 , "datatype" : "http://www.w3.org/2001/XMLSchema#integer" } ] , "http://dbpedia.org/ontology/PopulatedPlace/areaTotal" : [ { "type" : "literal", "value" : "1301.9688931491348" , "datatype" : "http://dbpedia.org/datatype/squareKilometre" }

    Read the article

  • Using string constants in implicit conversion

    - by kornelijepetak
    Consider the following code: public class TextType { public TextType(String text) { underlyingString = text; } public static implicit operator String(TextType text) { return text.underlyingString; } private String underlyingString; } TextType text = new TextType("Something"); String str = text; // This is OK. But I want to be able do the following, if possible. TextType textFromStringConstant = "SomeOtherText"; I can't extend the String class with the TextType implicit operator overload, but is there any way to assign a literal string to another class (which is handled by a method or something)? String is a reference type so when they developed C# they obviously had to use some way to get a string literal to the class. I just hope it's not hardcoded into the language.

    Read the article

  • Reading Source Code Aloud

    - by Jon Purdy
    After seeing this question, I got to thinking about the various challenges that blind programmers face, and how some of them are applicable even to sighted programmers. Particularly, the problem of reading source code aloud gives me pause. I have been programming for most of my life, and I frequently tutor fellow students in programming, most often in C++ or Java. It is uniquely aggravating to try to verbally convey the essential syntax of a C++ expression. The speaker must give either an idiomatic translation into English, or a full specification of the code in verbal longhand, using explicit yet slow terms such as "opening parenthesis", "bitwise and", et cetera. Neither of these solutions is optimal. On the one hand, an idiomatic translation is only useful to a programmer who can de-translate back into the relevant programming code—which is not usually the case when tutoring a student. In turn, education (or simply getting someone up to speed on a project) is the most common situation in which source is read aloud, and there is a very small margin for error. On the other hand, a literal specification is aggravatingly slow. It takes far far longer to say "pound, include, left angle bracket, iostream, right angle bracket, newline" than it does to simply type #include <iostream>. Indeed, most experienced C++ programmers would read this merely as "include iostream", but again, inexperienced programmers abound and literal specifications are sometimes necessary. So I've had an idea for a potential solution to this problem. In C++, there is a finite set of keywords—63—and operators—54, discounting named operators and treating compound assignment operators and prefix versus postfix auto-increment and decrement as distinct. There are just a few types of literal, a similar number of grouping symbols, and the semicolon. Unless I'm utterly mistaken, that's about it. So would it not then be feasible to simply ascribe a concise, unique pronunciation to each of these distinct concepts (including one for whitespace, where it is required) and go from there? Programming languages are far more regular than natural languages, so the pronunciation could be standardised. Speakers of any language would be able to verbally convey C++ code, and due to the regularity and fixity of the language, speech-to-text software could be optimised to accept C++ speech with a high degree of accuracy. So my question is twofold: first, is my solution feasible; and second, does anyone else have other potential solutions? I intend to take suggestions from here and use them to produce a formal paper with an example implementation of my solution.

    Read the article

  • C String literals: Where do they go?

    - by Chris Cooper
    I have read a lot of posts about "string literals" on SO, most of which have been about best-practices, or where the literal is NOT located in memory. I am interested in where the string DOES get allocated/stored, etc. I did find one intriguing answer here, saying: Defining a string inline actually embeds the data in the program itself and cannot be changed (some compilers allow this by a smart trick, don't bother). but, it had to do with C++, not to mention that it says not to bother. I am bothering. =D So my question is, again, where and how is my string literal kept? Why should I not try to alter it? Does the implementation vary by platform? Does anyone care to elaborate on the "smart trick?" Thanks for any explanations.

    Read the article

  • Create method to handle multiple types of controls

    - by Praesagus
    I am trying to create a method that accepts multiple types of controls - in this case Labels and Panels. The conversion does not work because IConvertible doesn't convert these Types. Any help would be so appreciated. Thanks in advance public void LocationsLink<C>(C control) { if (control != null) { WebControl ctl = (WebControl)Convert.ChangeType(control, typeof(WebControl)); Literal txt = new Literal(); HyperLink lnk = new HyperLink(); txt.Text = "If you prefer a map to the nearest facility please "; lnk.Text = "click here"; lnk.NavigateUrl = "/content/Locations.aspx"; ctl.Controls.Add(txt); ctl.Controls.Add(lnk); } }

    Read the article

  • Windows code pages, what are they?

    - by Mike D
    I'm trying to gain a basic understanding of what is meant by a Windows code page. I kind of get the feeling it's a translation between a given 8 bit value and some 'abstraction' for a given character graphic. I made the following experiment. I created a "" character literal with two versions of the letter u with an umlaut. One created using the ALT 129 (uses code page 437) value and one using the ALT 0252 (uses code page 1252) value. When I examined the literal both characters had the value 252. Is 252 the universal 8 bit abstraction for u with an umlaut? Is it the Unicode value? Aside from keyboard input are there any library routines or system calls that use code pages? For example is there a function to translate a string using a given code table (as above for the ALT 129 value)?

    Read the article

  • Creating BlackBerry method stubs using wscompile on WSDL from ColdFusion

    - by Jim B
    I have been working on a BlackBerry application that consumes web services from ColdFusion 7. The Java ME SDK and the Java Wireless Toolkit both require that the generated WSDL be of the document/literal type. Fortunately, I have input on the web service development so I tried setting 'style="document"' in the cfcomponent tag. This generated a document/literal style WSDL but now wscompile generates the following errors in several places: Found unknown simple type: javax.xml.soap.SOAPElement Found unknown simple type: java.util.Calendar Any ideas why this is happening? The WSDL does get parsed correctly by the JWSDP tool but the stubs use namespaces that are not available in the J2ME platform. I would have thought ColdFusion WSDL would work more easily with other products in the Java family.

    Read the article

  • How can I make my search more broad?

    - by user1804952
    I created this search mysql string and it is to literal or maybe un-literal? If I search for Dave for example it will only find items like "Dave something" and not find Dave. $queryArtist = mysql_query("SELECT * FROM artists WHERE artist LIKE '%$ArtistNameSearch%' ORDER BY artist ASC"); I know mysql_query is out dated and will change it to mysqli soon as I get this worked out. Stuck here. An example of it no working is Example of search Could it be becasue the %20 space? I got it figured out, but it still does NOT find one direction or other things even those exist. here is what I have now $queryArtist = mysql_query("SELECT * FROM artists WHERE match(artist) against('$SafeSearchTerm' in boolean mode)");

    Read the article

  • Strange JavaScript Regular Expression Behavior

    - by Kiwi
    I'm getting different behavior from a regular expression in JavaScript depending on whether or not I declare it using literal syntax. Using a extremely simple test HTML file: <html> <head> <script type="text/javascript"> var s = '3'; var regex1 = /\d/; var regex2 = new RegExp('\d'); alert(s.search(regex1)); // 0 (matches) alert(s.search(regex2)); // -1 (does not match) </script> </head> <body></body> </html> The regular expression declared with literal syntax (/\d/) works correctly, while the other (new RegExp('\d')) does not. Why on earth is this happening? I'm using Google Chrome 5.0.375.70 on Windows Vista Home Premium, if that's at all helpful.

    Read the article

  • jQuery add border to table.

    - by Kyle Sevenoaks
    Hi, I'm a jQuery noob, I tried this: <input value="1" type="checkbox" name="mytable" id="checkbox2" style="float:left;" /> {literal} <script src="http://code.jquery.com/jquery-latest.js"></script> <script type="text/javascript"> $(function() { //checkbox $(".mytable").click(function(){ $(".mytable").toggleClass('mytableborders'); }); }); </script> {/literal} <table class="mytable" id="cart">....</table> But it doesn't work, I want the checkbox to change the class of the table from .mytable to .mytableborders. Thanks :)

    Read the article

  • tiny mce pop ups blank in smarty

    - by ashishbhatt
    I am using tiny mce with smarty but it shows blank pop ups such as in image,anchor,preview buttons. The code i have used in my tpl file is `{literal} tinyMCE.init({ // General options mode : "textareas", theme : "advanced", plugins : "safari,pagebreak,style,layer,table,save,advhr,advimage,advlink,emotions,iespell,inlinepopups,insertdatetime,preview,media,searchreplace,print,contextmenu,paste,directionality,fullscreen,noneditable,visualchars,nonbreaking,xhtmlxtras,template", // Theme options theme_advanced_buttons1 : "save,newdocument,|,bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,styleselect,formatselect,fontselect,fontsizeselect", theme_advanced_toolbar_location : "top", theme_advanced_toolbar_align : "left", theme_advanced_statusbar_location : "bottom", theme_advanced_resizing : true, // Example content CSS (should be your site CSS) content_css : "css/content.css", // Drop lists for link/image/media/template dialogs template_external_list_url : "lists/template_list.js", external_link_list_url : "lists/link_list.js", external_image_list_url : "lists/image_list.js", media_external_list_url : "lists/media_list.js", // Replace values for the template plugin template_replace_values : { username : "Some User", staffid : "991234" } }); {/literal}`

    Read the article

  • Questions Regarding Handling of Received SMS

    - by Edwin
    Hi, i have managed to successfully write a little test app that can receive and send SMS, but got a couple of questions. (That's 'cos part of the code i copied from elsewhere and i would like to understand better). In my AndroidManifest as well as the sub-class of BroadcastReceiver, there is reference to the string literal "android.provider.Telephony.SMS_RECEIVED". However, i couldn't find any reference in the API that mentions this. Could someone point me to some reference that lists/explains these? As part of getting the message from the Intent, i did this: Object[] pdus = (Object[]) intent.getExtras().get("pdus"); Again this question is related to the use of hardcoded string literal. Where is the string "pdus" listed and described? Thanks in advance!

    Read the article

  • jQuery toggle show XHTML Smarty some clahes maybe? It doesn't show..

    - by Kyle Sevenoaks
    Hi, at this page new customer, there is something that it doesn't like, my boss asked me to make a show function that shows the new customer registration when the user clicks on the "ny kunde" button. Here is an example of the code I got working (I'm a jQuery noob). I guess there is some clash between this and the functions already installed on the page, but what? #roundbigboxnykunde is meant to be hidden on the page as on the jsfiddle example, but I have shown it to let you see what else is on the page. Code on my .tpl <button id="button1">&nbsp;</button> {literal} <script src="http://code.jquery.com/jquery-latest.js"></script> <script type="text/javascript"> $(function() { //checkbox $("#button1").click(function()1 $(".newCustomer").toggle("show"); }); });? </script> {/literal} <div class="newCustomer">... Thanks.

    Read the article

  • Manipulating both unicode and ASCII character set in C#

    - by Murlex
    I have this mapping in my C# application string [,] unicode2Ascii = { { "&#3001;", "\x86" } }; ஹ - is the unicode value for a tamil literal "ஹ". This is the raw hex literal for the unicode value saved by MS Word as a byte sequence. I am trying to map these unicode value "strings" to a hex value under 255 (so as to accommodate non-unicode supported systems). I trying to use string.replace like this: S = S.replace(unicode2Ascii[0,0], unicode2Ascii[0,1]); However the resultant ouput has a ? instead of the actual hex 0x86 stored. Any pointer on how I could set the encoding for the second element of that array to something like windows-1252? Or is there a better way to do this conversion? thanks in advance

    Read the article

  • Getting SharePoint absolute site url

    - by Francis
    I need to get the current absolute url of my site from inside an aspx page (no codebehind). I tried $SPUrl, but it get's converted into a relative url. <asp:Literal runat="server" text="<% $SPUrl:~Site/mypage.aspx %>" /> results in "/mypage.aspx". It's important that I get the full absolute url starting with "http://". <asp:Literal runat="server" text="<% $SPUrl:~SiteCollection/mypage.aspx %>" /> does the same. The goal is to get this url: "http://myspweb.com/mypage.aspx" as result.

    Read the article

  • Is it possible to access JSON properties with relative syntax when using JSON defined functions?

    - by Justin Vincent
    // JavaScript JSON var myCode = { message : "Hello World", helloWorld : function() { alert(this.message); } }; myCode.helloWorld(); The above JavaScript code will alert 'undefined'. To make it work for real the code would need to look like the following... (note the literal path to myCode.message) // JavaScript JSON var myCode = { message : "Hello World", helloWorld : function() { alert(myCode.message); } }; myCode.helloWorld(); My question is... if I declare functions using json in this way, is there some "relative" way to get access to myCode.message or is it only possible to do so using the literal namespace path myCode.message?

    Read the article

  • XPath to find an element with a similar sibling

    - by user364902
    Suppose I have this XML: <x> <e a='1' b='A'/> <e a='1' b='B'/> <e a='1' b='A'/> </x> I'd like to write an xpath to find any elements e which: Have attribute @b = 'A' Have the same value for attribute @a The xpath can't reference the literal value of attribute @a, however. It can reference the literal value of attribute @b. Or more generally, I want to find if there are any instances where there are two or more elements e[@b=A'] with the same value for attribute @a. Is this possible?

    Read the article

  • jQuery .noconflict with prototype not working in (you guessed it) IE.

    - by Kyle Sevenoaks
    On my new customer page, I have successfully implemented a jQuery show/hide toggle alongside a Prototype script using jQuery's .noconflict. (Thanks to all for answers!) But as the world of the net is, IE's not playing ball. {literal} <script src="http://code.jquery.com/jquery-latest.js" type="text/javascript"> </script> <script type="text/javascript"> var $j = jQuery.noConflict(); $j(function() { $j("#button1").click(function() { $j("#show-hide").toggle("slow"); }); });? </script> {/literal} As you all must know by now, I'm just newly coming to all this jQuery stuff, so I have no idea what could cause it. Thanks for any help.

    Read the article

< Previous Page | 4 5 6 7 8 9 10 11 12 13 14 15  | Next Page >